Skip to content

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
event_view
Feb 26, 2026
Merged

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
percona-ysorokin merged 1 commit intomainfrom
event_view

Conversation

@percona-ysorokin
Copy link
Collaborator

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.

…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.
@percona-ysorokin percona-ysorokin merged commit 5a647c1 into main Feb 26, 2026
7 checks passed
@percona-ysorokin percona-ysorokin deleted the event_view branch February 26, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant