MDEV-40903 galera.MDEV-38260 fails with ER_BINLOG_IN_USE on RESET MASTER - #5610
Open
sjaakola wants to merge 1 commit into
Open
MDEV-40903 galera.MDEV-38260 fails with ER_BINLOG_IN_USE on RESET MASTER#5610sjaakola wants to merge 1 commit into
sjaakola wants to merge 1 commit into
Conversation
The test fails from 12.3 onwards on the final cleanup step: mysqltest: At line 98: query 'reset master' failed: ER_BINLOG_IN_USE (4243): Cannot execute RESET MASTER as the binlog is in use by a connected slave or other RESET MASTER or binlog reader. The binlog-in-engine work added a use-count guard around RESET MASTER in MYSQL_BIN_LOG::reset_logs(): every binlog reader, a slave dump thread included, registers itself through start_use_binlog(), and RESET MASTER now refuses with ER_BINLOG_IN_USE while the count is non-zero. Earlier versions reset the binlog even with a slave still attached, which is why the test passes on 11.8 and older. The test's cleanup stops the async slave on node_2 and then immediately runs RESET MASTER on the master node_3. The dump thread on node_3 does not disappear at STOP SLAVE; it lingers until it next notices the closed connection, so it is often still registered when RESET MASTER arrives. Fix here is to use include/reset_master.inc, which terminates dump threads and retries on ER_BINLOG_IN_USE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test fails from 12.3 onwards on the final cleanup step:
mysqltest: At line 98: query 'reset master' failed: ER_BINLOG_IN_USE
(4243): Cannot execute RESET MASTER as the binlog is in use by a
connected slave or other RESET MASTER or binlog reader.
The binlog-in-engine work added a use-count guard around RESET MASTER in MYSQL_BIN_LOG::reset_logs(): every binlog reader, a slave dump thread included, registers itself through start_use_binlog(), and RESET MASTER now refuses with ER_BINLOG_IN_USE while the count is non-zero. Earlier versions reset the binlog even with a slave still attached, which is why the test passes on 11.8 and older.
The test's cleanup stops the async slave on node_2 and then immediately runs RESET MASTER on the master node_3. The dump thread on node_3 does not disappear at STOP SLAVE; it lingers until it next notices the closed connection, so it is often still registered when RESET MASTER arrives.
Fix here is to use include/reset_master.inc, which terminates dump threads and retries on ER_BINLOG_IN_USE.