MDEV-28278: mysqlbinlog GTID start-position respects server_id#4760
MDEV-28278: mysqlbinlog GTID start-position respects server_id#4760ChandanaRamakrishna wants to merge 1 commit intoMariaDB:10.11from
Conversation
|
¨Chandana seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
ParadoxV5
left a comment
There was a problem hiding this comment.
Thanks for the work!
Would you mind extending the scope of this PR to include MDEV-37231 – that is, mariadb-binlog should respect server_id even if the position is otherwise found.
Please also include a test or two to prove that the problem is corrected (and to warn future improvements if they’re breaking intended behavior).
MDEV-37231 has a concrete example that you can reference.
(The tests doesn’t have to be fresh new files – adjustments to the test for --start-position (if there is one) also meets the requirements.)
| /* MDEV-28278: ensure server_id also matches when evaluating GTID start position */ | ||
| if (!gtid_event_filter->exclude(&ev_gtid)) | ||
| { | ||
|
|
||
| if (position_gtid_filter && position_gtid_filter->get_num_start_gtids() > 0) | ||
| { |
There was a problem hiding this comment.
This approach is incorrect.
- It’s a manual loop next to and overriding a method call with a very similar purpose.
- It even works by bypassing the
gtid_state_validatorsection.
The fix to the check should most likely be a part of (that is, inside) exclude() – why should --stop-position not respect server_id, only --start-position?
|
Thanks for the review!
I will update the implementation to integrate the server_id check into
the GTID filtering logic and extend the fix to cover MDEV-37231 as well.
I will also add tests demonstrating the corrected behavior.
I'll push an updated patch shortly.
…On Mon, 9 Mar 2026 at 20:26, ParadoxV5 ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thanks for the work!
Would you mind extending the scope of this PR to include MDEV-37231
<https://jira.mariadb.org/browse/MDEV-37231> – that is, mariadb-binlog
should respect server_id even if the position is otherwise found.
Please also include a test or two to prove that the problem is corrected
(and to warn future improvements if they’re breaking intended behavior).
MDEV-37231 has a concrete example that you can reference.
(The tests doesn’t have to be fresh new files – adjustments to the test
for --start-position (if there is one) also meets the requirements.)
------------------------------
In client/mysqlbinlog.cc
<#4760 (comment)>:
> + /* MDEV-28278: ensure server_id also matches when evaluating GTID start position */
+ if (!gtid_event_filter->exclude(&ev_gtid))
+ {
+
+ if (position_gtid_filter && position_gtid_filter->get_num_start_gtids() > 0)
+ {
This approach is incorrect.
It’s not only an extra check that overrides another process, but also
bypasses the gtid_state_validator block if the override activates.
The fix to the check should most likely be a part of (that is, inside)
exclude() – why should --stop-position not respect server_id, only
--start-position?
—
Reply to this email directly, view it on GitHub
<#4760 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3O75UBGOSYL5YWTX5RWZL34P3LTVAVCNFSM6AAAAACWLVWBN6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTSMJVHEYDAMZWGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Fix for MDEV-28278.
mysqlbinlog should respect server_id when evaluating GTID start-position.
Events from different server_id should be skipped until a matching
domain_id + server_id + seq_no is found.
This patch adds server_id validation to ensure behavior matches
replica GTID filtering.
Tested on MariaDB 10.11 build.