PBS-37 feature: Combine binlog_server with minimysql_server into a single executable (part 5) - #182
Open
percona-ysorokin wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The merged target is missing the direct OpenSSL dependency required to compile mini-MySQL sources portably.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Combines binlog collection and mini-MySQL serving in the binlog_server executable while modernizing signal handling.
Changes:
- Adds the MySQL listener to pull mode.
- Uses Boost.Asio and asynchronous collection for shutdown handling.
- Removes the standalone mini-MySQL executable and legacy signal guard.
File summaries
| File | Description |
|---|---|
CMakeLists.txt |
Merges executable sources and dependencies. |
src/operations/pull_operation.cpp |
Adds listener and asynchronous collection. |
src/operations/fetch_operation.cpp |
Migrates signal handling to Boost.Asio. |
src/operations/collector_context.hpp |
Updates the collection API. |
src/operations/collector_context.cpp |
Uses io_context for termination. |
src/operations/flag_signal_guard.hpp |
Removes the legacy signal guard. |
src/operations/flag_signal_guard.cpp |
Removes its implementation. |
src/operations/flag_signal_guard_fwd.hpp |
Removes its forward declaration. |
src/minimysql_app.cpp |
Removes the standalone server entry point. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+702
to
+703
| Boost::headers Boost::json Boost::url Boost::asio | ||
| aws-cpp-sdk-s3-crt |
percona-ysorokin
force-pushed
the
combined_binary_assemble
branch
from
September 3, 2026 00:44
2d502f9 to
c181096
Compare
…ngle executable (part 5) https://perconadev.atlassian.net/browse/PBS-37 Combined functionality from 'binlog_server' and 'minimysql_server' binaries. 'binlog_server' in the 'pull' mode can now accept MySQL connections on a hardcoded port with predefined user credentials. 'operations::generic_operation<>' template specialization for the 'pull' operation extended with initializing an instance of the 'minimysql::network_service' class (a MySQL protocol-aware network listener). Reworked the way how 'operations::generic_operation<>' template specializations for both 'fetch' and 'pull' operations set custom system signal handlers. Instead of 'operations::flag_signal_guard' which simply tests a global atomic flag and sets custom signal handlers (SIGINT and SIGTERM that set this flag), we now use 'boost::asio::io_context' and 'boost::asio::signal_set'. Custom signal handler simply calls 'io_context::stop()' that allows 'io_context::run()' running in the main thread to terminate. Also, we now run 'collector_ctx.receive_binlog_events()' in a separate thread (spawn via 'std::async()'). Removed 'operations::flag_signal_guard' class. Removed 'minimysql_app.cpp' file. Removed 'minimysql_server' executable from the 'CMakeLists.txt'. Temporarily marked 'binlog_streaming.binlog_flush' and 'binlog_streaming.pull_mode' MTR test cases as non-parallel as they run 'binlog_server' executable in the 'pull' mode that now accepts MySQL connections on a hardcoded port. Without this change on of the 'binlog_server' instances wont be able to start listening on this network port.
percona-ysorokin
force-pushed
the
combined_binary_assemble
branch
from
September 3, 2026 01:12
c181096 to
b9a6090
Compare
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-37
Combined functionality from 'binlog_server' and 'minimysql_server' binaries.
'binlog_server' in the 'pull' mode can now accept MySQL connections on a hardcoded port with predefined user credentials.
'operations::generic_operation<>' template specialization for the 'pull' operation extended with initializing an instance of the 'minimysql::network_service' class (a MySQL protocol-aware network listener).
Reworked the way how 'operations::generic_operation<>' template specializations for both 'fetch' and 'pull' operations set custom system signal handlers. Instead of 'operations::flag_signal_guard' which simply tests a global atomic flag and sets custom signal handlers (SIGINT and SIGTERM that set this flag), we now use 'boost::asio::io_context' and 'boost::asio::signal_set'. Custom signal handler simply calls 'io_context::stop()' that allows 'io_context::run()' running in the main thread to terminate. Also, we now run
'collector_ctx.receive_binlog_events()' in a separate thread (spawn via 'std::async()').
Removed 'operations::flag_signal_guard' class.
Removed 'minimysql_app.cpp' file.
Removed 'minimysql_server' executable from the 'CMakeLists.txt'.