Skip to content

PS-11001: Implement logic for list mode#131

Open
kamil-holubicki wants to merge 1 commit into
Percona-Lab:mainfrom
kamil-holubicki:PS-11001-part-1
Open

PS-11001: Implement logic for list mode#131
kamil-holubicki wants to merge 1 commit into
Percona-Lab:mainfrom
kamil-holubicki:PS-11001-part-1

Conversation

@kamil-holubicki
Copy link
Copy Markdown
Collaborator

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

Added a new 'binlog_server list <json_config_file>' subcommand that enumerates every binlog file currently present in the configured storage and prints them, in chronological (storage) order, as a JSON document on stdout. The per-record schema matches the existing 'search_by_timestamp' / 'search_by_gtid_set' responses (name, size, uri, previous_gtids, added_gtids, min_timestamp, max_timestamp) and the 'binsrv::models::search_response' class is reused as-is. Unlike the search subcommands, 'list' returns 'status:success' with an empty 'result' array on an empty storage instead of raising an error. This makes 'list' the primary diagnostic command operators can use to distinguish a freshly initialized (empty) storage from a corrupted one.

Copy link
Copy Markdown
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM provided that CI is fixed by cherry-picking / merging the data_directory_8_0_to_8_4_upgrade.test fix

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

Added a new 'binlog_server list <json_config_file>' subcommand that
enumerates every binlog file currently present in the configured
storage and prints them, in chronological (storage) order, as a JSON
document on stdout. The per-record schema matches the existing
'search_by_timestamp' / 'search_by_gtid_set' responses (name, size,
uri, previous_gtids, added_gtids, min_timestamp, max_timestamp) and
the 'binsrv::models::search_response' class is reused as-is.
Unlike the search subcommands, 'list' returns 'status:success' with
an empty 'result' array on an empty storage instead of raising an
error. This makes 'list' the primary diagnostic command operators
can use to distinguish a freshly initialized (empty) storage from a
corrupted one.

Co-authored-by: Cursor <cursoragent@cursor.com>
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