While working on T352206: [toolsdb] Upgrade to MariaDB 10.6, I needed to restart the old primary temporarily to check something. MariaDB restarted with read_only=1 but I was surprised by the fact that the GTID was increasing.
I then realized I forgot to stop pt-hearbeat and it was still updating the heartbeat table even if read_only=1.
I think it would be nicer if pt-heartbeat respected the read_only setting, this should be possible if it connects with a user other than root, or maybe we can remove the READ_ONLY ADMIN privilege from the root user.