PS-9244 fix: binlog_server fails to resume copying binlog file after server restart #50
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/PS-9244
Binlog Server Utility now properly handles 'STOP' events which may be
written to the binlog when MySQL server shuts down.
Added specializations of the 'binsrv::event::generic_body_impl<>' and
'binsrv::event::generic_post_header_impl<>' for 'code_type::stop'
(both implemented via 'redirect_type' to 'empty_body' /
'empty_post_header'). 'STOP' is now a known event type for the
'binsrv::event::event' class and its inner body / post-header variants.
Updated 'binsrv::reader_context'- it is now based on the following state
machine:
(ROTATE(artificial) FORMAT_DESCRIPTION * (ROTATE|STOP))*
'process_binlog_event()' in the main application now calls
'close_binlog()' not only on real (non-artificial) 'ROTATE' events but
on 'STOP' events as well.
Introduced new 'binlog_streaming.pull_mode' MTR test case which checks
if the Binlog Server Utility properly handles reconnects and resuming
operation in background ('pull') mode.
Common functionality from the 'binlog_streaming.binsrv' and
'binlog_streaming.pull_mode' extracted into the following include files:
filesystem ('file') or a AWS S3 ('s3') storage backend should be used.
configuring log file and generating JSON configuration.
and removing log file along with JSON configuration file.
Temporarily disabled running MTR under "Clang 17 ASan" in GitHub
Workflows because of the "-stdlib=libc++ -fsanitize=address"
alloc-dealloc-mismatch issue
(llvm/llvm-project#59432).
Hopefully, the problem will be fixed in clang-18.