MDEV-39153 Fix sporadic main.change_master_default mismatch#5221
MDEV-39153 Fix sporadic main.change_master_default mismatch#5221FarihaIS wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for a new 'restart_abort:' command in 'mariadb-test-run.pl' to handle cases where a server is expected to abort during restart. However, the regular expression used to parse this command is too restrictive, as it requires a colon and at least one option character to match. If the command is written without options, it will fail to match and fall back to a normal restart, potentially causing a race condition. A more robust regex and fallback handling have been suggested to resolve this issue.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
LGTM. Please stand by for the final reviewer.
|
first, I think, So personally I don't understand why |
|
@vuvova thank you for your feedback, agreed! Here are the changes I've made to the PR:
Could you please let me know if this is what you meant? Thank you |
bb6ae60 to
c3c1204
Compare
ParadoxV5
left a comment
There was a problem hiding this comment.
- Remove
restart_bindirdead code from both MTR andstart_mysqld.inc- Make MTR
mtr_error()on unknown expect file commands instead of silently ignoring themCould you please let me know if this is what you meant? Thank you
Thank you, but these two modifications are tangent to the MDEV-39153 fix, so please extract them to a separate PR or two.
660ba01 to
f2076c1
Compare
The test used "restart_abort:" in the expect file, which MTR never recognized. It fell through to the else branch, deleted restart_opts, and started the server with defaults (heartbeat_period=60 instead of 0). Replace restart_abort with direct --exec $MYSQLD calls. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
@ParadoxV5 sounds good, I extracted the unrelated changes requested from this Jira, created a new Jira for this (https://jira.mariadb.org/browse/MDEV-40023), and moved these changes to a separate PR (#5229). Is this workflow fine? |
Description
The test
main.change_master_defaultsporadically fails withslave_heartbeat_periodshowing60.000instead of0.000. The test usedrestart_abort:commands in the expect file, which MTR never recognized - they fell through to theelsebranch, which deletedrestart_optsand started the server with defaults.Replace
restart_abortwith direct--exec $MYSQLDcalls to properly test invalid heartbeat optionsRelease Notes
N/A
How can this PR be tested?
Execute the
main.change_master_defaulttest inmysql-test-run.Before this change:
There were sporadic failures like so:
After this change:
Running this test 50 times consecutively with
--repeat=50inmysql-test-runshows no failures:Basing the PR against the correct MariaDB version
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.