[MDEV-22530] Aborting OPTIMIZE TABLE still logs in binary log and replicates to the Slave server. Created: 2020-05-12 Updated: 2023-05-12 Resolved: 2021-05-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.3.16, 10.4.12, 10.2 |
| Fix Version/s: | 10.2.39, 10.3.30, 10.4.20, 10.5.11 |
| Type: | Bug | Priority: | Critical |
| Reporter: | suresh ramagiri | Assignee: | Sujatha Sivakumar (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS/RHEL 7 |
||
| Description |
|
Aborting OPTIMIZE TABLE still logs in binary logs and replicates to the Slave server. It is observed that while OPTIMIZE TABLE query is executing, aborting it will still have the entry of the same in the binary logs and it's getting replicated at the slave end. Tested and found this behavior at MariaDB server 10.3.16 and 10.4.12. It doesn't look like an expected behavior and so reporting it. Here is my test result. Master:
Slave: You can see in the processlist, OPTIMIZE TABLE query is being executed. "show slave status" showed it moved to the changed master binary log position.
Any further details needed, let me know. Thank You, |
| Comments |
| Comment by Andrei Elkin [ 2020-06-22 ] |
|
sujatha.sivakumar I think it's okay to binlog a killed Query regardless of the # of tables in it and also regardless of the KILL type. We would just state that in the docs. Go to ask serg about this possibility which looks quite harmless to me. As to no actual SOFT kill, we should open a new ticket for that (it does not look good to reuse the current one imo). |
| Comment by Sujatha Sivakumar (Inactive) [ 2020-12-21 ] |
|
Hello Andrei, Please review the fix for https://github.com/MariaDB/server/commit/44eb746c226d3eabe93d476790bb0c6bb30106b2 Please review top two commits: 1. commit 44eb746c226d3eabe93d476790bb0c6bb30106b2 2. commit 502a6b9b3ce119f507cb8ccc9ec034a9953ad3cc Thank you. |
| Comment by Sachin Setiya (Inactive) [ 2021-05-11 ] |
|
OK to push |
| Comment by Sujatha Sivakumar (Inactive) [ 2021-05-17 ] |
|
Hence both are tested and pushed together. 10.3: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.3-sujatha 10.3 cherry-pick testing. commit e683e8c010bd2ffa9415857828e89f94b9ac0550 10.3 cherry-pick testing. 10.4: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.4-sujatha 10.4 cherry-pick testing. commit 4169e6571c342b57a3ce89e7ae45328c06beb788 10.4 cherry-pick testing. Merge conflicts addressed. 10.5: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.5-sujatha 10.5 cherry-pick testing. No Merge conflicts commit f0c220898fbe8f58393d386aa0cb6da6b7cedf9f 10.5 cherry-pick testing. Moved changes to log_event_server.cc |