Skip to content

Conversation

@percona-ysorokin
Copy link
Collaborator

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

'replication' section of the main configuration file extended with one more required string 'mode' configuration parameter, which can be either 'position' or 'gtid'. At this moment only 'position' is supported.

'replication_config' class moved from the 'easymysql' namespace to 'binsrv'.

Added 'binbsrv::storage_metadata' class that is intended to keep persistent info for binlog storages. Currently it has only one attribute 'mode' (either 'position' or 'gtid') that indicates in which replication mode this storage was created. This metadata is stored in the storage folder (along with binlog index and binlog data files) under the 'metadata.json' name. In addition, for forward compatibility, this metadata file also includes the 'version' parameter that currently is alwas set to / expected to be '1'.

'binsrv::storage' constructor extended with additional logic to read / write and validate the content of the metadata file.

Similarly to 'util/nv_tuple_from_json.hpp' file that reads from JSON to 'util::nv_tuple', added 'util/nv_tuple_to_json.hpp' that writes data from 'util::nv_tuple' to JSON.

Main application now prints to the log file replication mode from the configuration file along with the one extracted from the storage metadata.

Re-factored the way how classes report their string-convertibility: now each class interested in specializing 'util::is_string_convertable' template does this in its own header. In order to minimize dependencies, 'util::is_string_convertable' definition extracted into separate header 'util/nv_tuple_json_support.hpp'.

We no longer use 'boost::json' as a header only library (by including 'boost/json/src.hpp'). Instead, we now use 'libboost_json.a' static library.

Updated 'set_up_binsrv_environment.inc' MTR include file - we now explicitly set '<replication.mode>' to 'position' in the generated configuration file.

'main_config.json' sample configuration file updated with new '<replication.mode>' parameter.

Updated 'README.md' with the '<replication.mode>' parameter description.

… / position-based replication mode

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

'replication' section of the main configuration file extended with one more required
string 'mode' configuration parameter, which can be either 'position' or 'gtid'. At this
moment only 'position' is supported.

'replication_config' class moved from the 'easymysql' namespace to 'binsrv'.

Added 'binbsrv::storage_metadata' class that is intended to keep persistent info for
binlog storages. Currently it has only one attribute 'mode' (either 'position' or 'gtid')
that indicates in which replication mode this storage was created. This metadata is
stored in the storage folder (along with binlog index and binlog data files) under the
'metadata.json' name. In addition, for forward compatibility, this metadata file also
includes the 'version' parameter that currently is alwas set to / expected to be  '1'.

'binsrv::storage' constructor extended with additional logic to read / write and
validate the content of the metadata file.

Similarly to 'util/nv_tuple_from_json.hpp' file that reads from JSON to 'util::nv_tuple',
added 'util/nv_tuple_to_json.hpp' that writes data from 'util::nv_tuple' to JSON.

Main application now prints to the log file replication mode from the configuration
file along with the one extracted from the storage metadata.

Re-factored the way how classes report their string-convertibility: now each class
interested in specializing 'util::is_string_convertable' template does this in its own header. In order to minimize dependencies, 'util::is_string_convertable' definition
extracted into separate header 'util/nv_tuple_json_support.hpp'.

We no longer use 'boost::json' as a header only library (by including
'boost/json/src.hpp'). Instead, we now use 'libboost_json.a' static library.

Updated 'set_up_binsrv_environment.inc' MTR include file - we now explicitly set
'<replication.mode>' to 'position' in the generated configuration file.

'main_config.json' sample configuration file updated with new '<replication.mode>'
parameter.

Updated 'README.md' with the '<replication.mode>' parameter description.
@percona-ysorokin percona-ysorokin merged commit d27de1f into main Dec 7, 2025
7 checks passed
@percona-ysorokin percona-ysorokin deleted the storage_metadata branch December 7, 2025 23:41
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