scylladb / scylla-manager

The Scylla Manager
https://manager.docs.scylladb.com/stable/
Other
51 stars 33 forks source link

Don't backup views #3771

Closed Michal-Leszczynski closed 2 months ago

Michal-Leszczynski commented 6 months ago

Backing up views doesn't make any sense as the advised way to restore them is by recreating them on restored table. This would require to first validate that the base table is even being backed up. Checking which tables are views and which are not can currently be done only via cql session. It might be available via scylla client if https://github.com/scylladb/scylladb/issues/17958 is implemented.

cc: @karol-kokoszka @tzach

karol-kokoszka commented 5 months ago

Candidate for 3.2.9 (or 3.3.1)

karol-kokoszka commented 5 months ago

grooming notes

SM doesn't restore views using SSTables. It just recreates them. There is complete no need of backing them up.

We must drop the backup of views and explicitly inform about it in the documentation.

Michal-Leszczynski commented 3 months ago

@karol-kokoszka What about the situation, where someone sets --keyspace (perhaps by accident or because of not fully understanding how views work) in a way that the view table is included in the backup, but the base table is not? The two options are:

The second option results in more uploads and costs, but it's safer.

karol-kokoszka commented 3 months ago

The best in my option would be to validate this parameter upfront and just do not proceed. Although the second option sounds reasonable too, but please WARN (or even ERROR) in logs.