PS-10246 feature: Implement fixing next_event_position fields / checksums in the event common_header / footer in case of reconnecting to another node (part 2)#97
Merged
percona-ysorokin merged 1 commit intomainfrom Feb 26, 2026
Conversation
…sums in the event common_header / footer in case of reconnecting to another node (part 2) https://perconadev.atlassian.net/browse/PS-10246 Global refactoring of how events and their components are constructed. Introduced the following lightweight classes for quick event data extraction / insertion without full parsing: - binsrv::events::common_header_view - binsrv::events::common_header_updatable_view - binsrv::events::footer_view - binsrv::events::footer_updatable_view - binsrv::events::event_view - binsrv::events::event_updatable_view It is now also possible to construct complete event objects / subobjects from their corresponding views. Added mechanism for safe event data manipulation which would perform automatic checksum re-calculation - all the modifications in the 'event_updatable_view' object are expected to be performed via an instance of the 'event_updatable_view::write_proxy' class acquired via 'event_updatable_view::get_write_proxy()' method. Fixed an issue with the checksum verification logic in the 'binsrv::events::reader_context'. We now differentiate between user-requested intention to verify received event checksums (the "replication.verify_checksum" parameter in the configuration file, corresponding to the 'binsrv::events::reader_context::is_checksum_verification_enabled()' method) and the value of the 'chacksum_algorithm' field from the body of the last encountered FORMAT_DESCRIPTION event binsrv::events::reader_context::is_footer_expected() method). Fixed 'requires' clauses in some of the 'util::insert_fixed_int_to_byte_span()' / 'util::extract_fixed_int_from_byte_span()' function overloads.
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/PS-10246
Global refactoring of how events and their components are constructed.
Introduced the following lightweight classes for quick event data extraction / insertion without full parsing:
It is now also possible to construct complete event objects / subobjects from their corresponding views.
Added mechanism for safe event data manipulation which would perform automatic checksum re-calculation - all the modifications in the 'event_updatable_view' object are expected to be performed via an instance of the 'event_updatable_view::write_proxy' class acquired via 'event_updatable_view::get_write_proxy()' method.
Fixed an issue with the checksum verification logic in the 'binsrv::events::reader_context'. We now differentiate between user-requested intention to verify received event checksums (the "replication.verify_checksum" parameter in the configuration file, corresponding to the 'binsrv::events::reader_context::is_checksum_verification_enabled()' method) and the value of the 'chacksum_algorithm' field from the body of the last encountered FORMAT_DESCRIPTION event
binsrv::events::reader_context::is_footer_expected() method).
Fixed 'requires' clauses in some of the 'util::insert_fixed_int_to_byte_span()' / 'util::extract_fixed_int_from_byte_span()' function overloads.