Skip to content

Conversation

@percona-ysorokin
Copy link
Collaborator

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

Changed the definition of the 'util::bounded_string_storage' - instead of being 'std::array<std::byte, N>', it is now
'boost::container::static_vector<std::byte, N>' which is more appropriate because it holds real size in one of its members eliminating the necessity to do 'strlen()' every time we want to use this data as a string. This affected 'server_version' member in the FORMAT_DESCRIPTION event post header and 'tag' in the the GTID_TAGGED_LOG event body.

In addition, changed the underlying container for storing 'binlog' member (file name) in the ROTATE event body: instead of 'std::string', we now use 'boost::container::small_vector<std::byte, 64> which will let us avoid dynamic allocations for file names up to 64 bytes.

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

Changed the definition of the 'util::bounded_string_storage' - instead of being
'std::array<std::byte, N>', it is now
'boost::container::static_vector<std::byte, N>' which is more appropriate
because it holds real size in one of its members eliminating the necessity to
do 'strlen()' every time we want to use this data as a string.
This affected 'server_version' member in the FORMAT_DESCRIPTION event
post header and 'tag' in the the GTID_TAGGED_LOG event body.

In addition, changed the underlying container for storing 'binlog' member (file
name) in the ROTATE event body: instead of 'std::string', we now use
'boost::container::small_vector<std::byte, 64> which will let us avoid dynamic
allocations for file names up to 64 bytes.
@percona-ysorokin percona-ysorokin merged commit bfee64e into main Nov 20, 2025
7 checks passed
@percona-ysorokin percona-ysorokin deleted the small_static_containers branch November 20, 2025 17:44
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