Hi, Andrei, I don't see a point in caching the value in memory that is very cheap to calculate per event. I've pushed f8ec4dd38d0 to 10.4-serg three hours ago and Jenkins said it's fine. So I'd suggest we go with it, because we really have to close this blocker and release ES now. And MDEV-27837 will be fixed as a separate bug. queue_event checks global_system_variables.server_id in multiple places, moving only do_accept_own_server_id into Master_info will not make it any better or worse against MDEV-27837.
As far as I can see, you can calculate it for every event just the same.
The per event computation is extraneous and not consistent with the nature of the flag that belongs to the group of events.
Also notice (or remember) a "FR" MDEV-27837 disallow `set @@session.server_id` within transaction so until this bug is fixed it's not 'just the same'.
I am recomming the patch, assuming that you'll be fine with the Gtid time only flag computation.
Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org