Skip to content

Conversation

@percona-ysorokin
Copy link
Collaborator

https://perconadev.atlassian.net/browse/PS-10245

Implemented more sophisticated model of 'binstv::event::reader_context' state machine. Instead of
(ROTATE(artificial) FORMAT_DESCRIPTION * (ROTATE|STOP)?)+ we now also track GTID-related events and transaction boundaries (
ROTATE(artificial)
FORMAT_DESCRIPTION
PREVIOUS_GTIDS_LOG?
((ANONYMOUS_GTID_LOG | GTID_LOG | GTID_TAGGED_LOG) )
(ROTATE | STOP)?
)+
Implemented additional method 'is_at_transaction_boundary()' that can be used to check if we reached the end of transaction after processing the event.

Main application extended with simplified transaction event logging at 'info' level:

  • we now write simple messages with event code types and event flags if any (e.g. 'artificial')
  • we also write corresponding GTIDs at the end of transactions.

Added new 'binlog_streaming.kill_and_restart' MTR test case which checks for different endings of binlog files after rotation:

  • normal 'ROTATE' event (after 'FLUSH BINARY LOGS')
  • normal 'STOP' event (after server shutdown)
  • termination without 'ROTATE' / 'STOP' event (in case server crashed / was killed and restarted)
  • currently open binlog file.

…t 3)

https://perconadev.atlassian.net/browse/PS-10245

Implemented more sophisticated model of 'binstv::event::reader_context' state
machine. Instead of
(ROTATE(artificial) FORMAT_DESCRIPTION <ANY>* (ROTATE|STOP)?)+
we now also track GTID-related events and transaction boundaries
(
  ROTATE(artificial)
  FORMAT_DESCRIPTION
  PREVIOUS_GTIDS_LOG?
  ((ANONYMOUS_GTID_LOG | GTID_LOG | GTID_TAGGED_LOG) <ANY>*)*
  (ROTATE | STOP)?
)+
Implemented additional method 'is_at_transaction_boundary()' that can be used to
check if we reached the end of transaction after processing the event.

Main application extended with simplified transaction event logging at 'info' level:
- we now write simple messages with event code types and event flags if any (e.g.
  'artificial')
- we also write corresponding GTIDs at the end of transactions.

Added new 'binlog_streaming.kill_and_restart' MTR test case which checks for different
endings of binlog files after rotation:
- normal 'ROTATE' event (after 'FLUSH BINARY LOGS')
- normal 'STOP' event (after server shutdown)
- termination without 'ROTATE' / 'STOP' event (in case server crashed / was killed and
  restarted)
- currently open binlog file.
@percona-ysorokin percona-ysorokin merged commit f4a0558 into main Dec 22, 2025
7 checks passed
@percona-ysorokin percona-ysorokin deleted the gtid_transaction_boundaries branch December 22, 2025 19:12
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.

2 participants