Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added initial version of the file_storage #30

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

percona-ysorokin
Copy link
Collaborator

Added the 'file_storage" class that helps to write events received from the MySQL Server to local binlog files. It automatically deals with writing magic binlog payloads ("\xFEbin") and maintaining binlog index file ("binlog.index"). At the moment, this class can start with only empty initial state.

Main configuration file extended with additional "storage" section, which currently has only one parameter "path", pointing to the location to which binlog files should be downloaded.

Main application extended with writing received binlog events into local files using the functionality of the 'file_storage' class.

Added additional flag 'binlog_in_use' to the 'binsrv::event::flag_type' enum which is used by the server to mark binlog files that are currently in use. This flag should never appear in events received on the client side.

'reader_context' class extended with additional check that position in non-artificial rotate event post header must always be equal to magic_binlog_offset (4).

Some '.size()' calls changed to 'std::size()'. Some '.data()' calls changed to 'std::data()'.

Added the very first MTR test case that tests Binlog Server Utility functionality. It instructs the MySQL Server to generate 2 binary log files. Then it executes the Binlog Server Utility to download them into a local file storage. And after that it compares the binlog files stored on the server with those downloaded via the utility.

Added instructions on how to integrate these tests with the MTR framework.

Links pointing to MySQL Source code fragments on GitHub updated to version 8.0.36.

Added the 'file_storage" class that helps to write events received from the
MySQL Server to local binlog files. It automatically deals with writing magic
binlog payloads ("\xFEbin") and maintaining binlog index file ("binlog.index").
At the moment, this class can start with only empty initial state.

Main configuration file extended with additional "storage" section, which
currently has only one parameter "path", pointing to the location to which
binlog files should be downloaded.

Main application extended with writing received binlog events into local files
using the functionality of the 'file_storage' class.

Added additional flag 'binlog_in_use' to the 'binsrv::event::flag_type' enum
which is used by the server to mark binlog files that are currently in use.
This flag should never appear in events received on the client side.

'reader_context' class extended with additional check that position in
non-artificial rotate event post header must always be equal to
magic_binlog_offset (4).

Some '<container>.size()' calls changed to 'std::size(<container>)'.
Some '<container>.data()' calls changed to 'std::data(<container>)'.

Added the very first MTR test case that tests Binlog Server Utility
functionality. It instructs the MySQL Server to generate 2 binary log files.
Then it executes the Binlog Server Utility to download them into a local file
storage. And after that it compares the binlog files stored on the server with
those downloaded via the utility.

Added instructions on how to integrate these tests with the MTR framework.

Links pointing to MySQL Source code fragments on GitHub updated to version
8.0.36.
@percona-ysorokin percona-ysorokin merged commit 8b14b32 into main Jan 25, 2024
5 checks passed
@percona-ysorokin percona-ysorokin deleted the file_storage branch January 25, 2024 16:43
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