Repository navigation
PBS-42 feature: Implement basic support for COM_BINLOG_DUMP packet handling (part 4) - #197
Merged
percona-ysorokin merged 1 commit intoSep 30, 2026
Conversation
percona-ysorokin
requested review from
kamil-holubicki
and
a balanced review from Copilot
September 30, 2026 12:54
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new test does not explicitly close the lingering source-side Binlog Dump session before waiting for session cleanup.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds MTR coverage for round-trip binlog streaming through PBS.
Changes:
- Adds a replication-source round-trip test.
- Introduces reusable process start/termination helpers.
- Refactors existing pull-mode tests to use those helpers.
| File | Description |
|---|---|
mtr/binlog_streaming/t/rs_roundtrip.test |
Tests remote binlog extraction and restoration. |
mtr/binlog_streaming/r/rs_roundtrip.result |
Defines expected round-trip test output. |
mtr/binlog_streaming/t/pull_mode.test |
Uses shared process helpers. |
mtr/binlog_streaming/t/binlog_flush.test |
Uses shared process startup. |
mtr/binlog_streaming/t/auth_method_switch.test |
Uses shared process helpers. |
mtr/binlog_streaming/include/start_proc_in_background.inc |
Adds background process startup utility. |
mtr/binlog_streaming/include/terminate_proc.inc |
Adds graceful process termination utility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| --source ../include/tear_down_binsrv_environment.inc | ||
|
|
||
| --source include/wait_until_count_sessions.inc |
| --let $binsrv_pid_file = $MYSQL_TMP_DIR/auth_switch_binsrv.pid | ||
| --let $binsrv_spawn_cmd_line = $BINSRV pull $binsrv_config_file_path > /dev/null 2>&1 & echo \$! > $binsrv_pid_file | ||
|
|
||
| # We route the spawn through Perl's system() rather than --exec because |
Contributor
There was a problem hiding this comment.
It was moved to a dedicated inc file,which is fine, but the comment explaining the magic is worth keeping there
Collaborator
Author
There was a problem hiding this comment.
this comment moved to the .inc file as well
| --source ../include/start_proc_in_background.inc | ||
|
|
||
| --echo | ||
| --echo *** Waiting for the replication source listener. |
Contributor
There was a problem hiding this comment.
The same block in auth_method_switch.test. Maybe extract to a dedicated inc file?
…ndling (part 4) https://perconadev.atlassian.net/browse/PBS-42 Added initial MTR coverage for the replication source functionality. * Added new 'binlog_streaming.rs_roundtrip' MTR test case which checks that data collected by PBS and then extracted from PBS via 'mysqlbinlog --read-from-remote-server' is identical to what was originally added to MySQL Server. * Introduced 'start_proc_in_background.inc' and 'terminate_proc.inc' MTR include files which help with starting PBS in pull mode in the background and then gracefully terminating it. * Introduced new 'kill_binlog_dump_connection.inc' MTR include file which silently terminates the 'Binlog Dump' connection. It is recommended to include this file before 'wait_until_count_sessions.inc' to ensure MTR test case stability. * Added new 'wait_for_listening_port.inc' MTR include file which waits until a specified network port is ready to accept connections. It is currently used to make sure that PBS is ready to accept connections on the '<replication_source.port>' port. * 'binlog_streaming.auth_method_switch', 'binlog_streaming.binlog_flush' and 'binlog_streaming.pull_mode' reworked to use new '.inc' files.
percona-ysorokin
force-pushed
the
com_binlog_dump_mtr
branch
from
September 30, 2026 15:03
8cc45ad to
784bfc2
Compare
kamil-holubicki
approved these changes
Sep 30, 2026
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.

https://perconadev.atlassian.net/browse/PBS-42
Added initial MTR coverage for the replication source functionality.
checks that data collected by PBS and then extracted from PBS via
'mysqlbinlog --read-from-remote-server' is identical to what was
originally added to MySQL Server.
MTR include files which help with starting PBS in pull mode in the
background and then gracefully terminating it.
which silently terminates the 'Binlog Dump' connection. It is
recommended to include this file before
'wait_until_count_sessions.inc' to ensure MTR test case stability.
until a specified network port is ready to accept connections. It is
currently used to make sure that PBS is ready to accept connections on
the '<replication_source.port>' port.
'binlog_streaming.binlog_flush' and 'binlog_streaming.pull_mode'
reworked to use new '.inc' files.