Skip to content
Snippets Groups Projects
Commit c6a67524 authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

console client: add space filter for snapshot files

parent dff3c4c2
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ static const void *tc_options_def = gopt_start( ...@@ -53,7 +53,7 @@ static const void *tc_options_def = gopt_start(
gopt_option('P', GOPT_ARG, gopt_shorts('P'), gopt_option('P', GOPT_ARG, gopt_shorts('P'),
gopt_longs("play"), " <file>", "replay xlog file to the specified server"), gopt_longs("play"), " <file>", "replay xlog file to the specified server"),
gopt_option('S', GOPT_ARG, gopt_shorts('S'), gopt_option('S', GOPT_ARG, gopt_shorts('S'),
gopt_longs("space"), " <space>", "xlog file space number"), gopt_longs("space"), " <space>", "filter by space number"),
gopt_option('F', GOPT_ARG, gopt_shorts('F'), gopt_option('F', GOPT_ARG, gopt_shorts('F'),
gopt_longs("from"), " <lsn>", "start xlog file from the specified lsn"), gopt_longs("from"), " <lsn>", "start xlog file from the specified lsn"),
gopt_option('T', GOPT_ARG, gopt_shorts('T'), gopt_option('T', GOPT_ARG, gopt_shorts('T'),
......
...@@ -135,6 +135,10 @@ static int tc_snapshot_printer(struct tnt_iter *i) { ...@@ -135,6 +135,10 @@ static int tc_snapshot_printer(struct tnt_iter *i) {
struct tnt_tuple *tu = TNT_ISTORAGE_TUPLE(i); struct tnt_tuple *tu = TNT_ISTORAGE_TUPLE(i);
struct tnt_stream_snapshot *ss = struct tnt_stream_snapshot *ss =
TNT_SSNAPSHOT_CAST(TNT_ISTORAGE_STREAM(i)); TNT_SSNAPSHOT_CAST(TNT_ISTORAGE_STREAM(i));
if (tc.opt.space_set) {
if (ss->log.current.row_snap.space != tc.opt.space)
return 0;
}
((tc_printerf_snap_t)tc.opt.snap_printer)(&ss->log.current.row_snap, tu); ((tc_printerf_snap_t)tc.opt.snap_printer)(&ss->log.current.row_snap, tu);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment