Hi,

It's possible to create a snapshot on a set of tables with the same name
name/tag with:
$ nodetool snapshot --kt-list ks.tb,system.local -t mysnapshot
$ nodetool listsnapshots
[..]
mysnapshot  system  local  1.16 KiB  21.47 KiB    2023-03-02T13:19:13.757Z
mysnapshot  ks      tb     1.02 KiB   6.08 KiB    2023-03-02T13:19:13.757Z

It's also possible to create a snapshot with an existing name, as long as
it's in a different table:
$ nodetool snapshot --kt-list ks.tb2 -t mysnapshot
$ nodetool listsnapshots
[..]
mysnapshot     ks       tb2        1.16 KiB  21.47 KiB
 2023-03-02T13:19:42.140Z
mysnapshot     ks       tb         1.02 KiB  6.08 KiB
2023-03-02T13:19:13.757Z
mysnapshot     system   local      107 bytes 6.98 KiB
2023-03-02T13:19:13.757Z

I found this a bit surprising, since I would expect a snapshot with the
same name on different tables to represent the same logical snapshot taken
at the same point-in-time.

This affects the design of the snapshots virtual table schema on
CASSANDRA-18102[1] because the timestamp needs to be included in the
primary key to allow distinguishing between different snapshots with the
same name, which seems a bit counter-intuitive.

I think we should disallow creating a snapshot if another snapshot already
exists with the same name in any other table, so snapshots with the same
name on different tables are guaranteed to belong to the same logical
point-in-time snapshot.

Does anyone think it's useful to be able to create separate snapshots with
the same names across different tables and we should retain this support?

Let me know what do you think,

Paulo

[1] - https://issues.apache.org/jira/browse/CASSANDRA-18102

Reply via email to