[MDEV-18672] MASTER_GTID_WAIT timeout on the master Created: 2019-02-21  Updated: 2022-09-07

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.2.21
Fix Version/s: 10.2

Type: Bug Priority: Major
Reporter: VAROQUI Stephane Assignee: Brandon Nesterenko
Resolution: Unresolved Votes: 0
Labels: renaming

Issue Links:
Problem/Incident
causes MXS-2643 Maxscale causal_reads and Mariadb per... Closed

 Description   

Hi,

MASTER_GTID_WAIT work as documented when executed on a slave,

But if it get trigger on the master it timeout !

  • That's wrong because last gtid is from the master and so should exist
  • This defeat any naive strategy to load balance read on the master as well .
  • This defeat strategy to use same code on a production master-slave with single database deployment for dev

Thanks



 Comments   
Comment by Andrei Elkin [ 2020-06-15 ]

stephane@skysql.com, MASTER_GTID_WAIT() is defined in the sense of gtid_slave_pos_pos__wait(). Could have (and should've in my taste) been taken such name, but apparently the name chosen to follow a pre-existing wait function.

We can go along with this ticket to rename it with necessary deprecation steps, I think.

Comment by VAROQUI Stephane [ 2021-10-28 ]

HI Andrei, why not simply defining it as gtid_binlog_pos_wait() on the executed GTID binlog position it can be queued and mutexed after the binlog 2PC and would only work on a slave having log_slave_updates=1, current implementation would be rename gtid_slave_pos_wait() but i guess it also lack or the replication source or a liste of domain ids to compare with

Comment by Andrei Elkin [ 2021-11-01 ]

stephane@skysql.com, bonjour! Your comment just forces me to think towards a master-slave neutral binlog-agnostic-too WAIT_FOR_GTID(list-of-gtids-to-wait-until-they-got-committed.

That is the user application would call SELECT wait_for_gtid() on any server.
But I still would like to replace the old one with it.

Please review this!

Cheers,
Andrei

Comment by VAROQUI Stephane [ 2022-09-07 ]

Привет Andrei,

Good to hear from you and see that this task is moving.
Make sens to get an other name to not break existing application using it already and master _wait_gtid could be a alias be renamed wait_for_leader_gtid() as master was deprecated if i remember.

Cheers
/svar

Comment by Andrei Elkin [ 2022-09-07 ]

Bonjour, Stephane! Would you also like the offered WAIT_FOR_GTID()?

Comment by VAROQUI Stephane [ 2022-09-07 ]

Yes yes for sure

Generated at Thu Feb 08 08:45:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.