when are new tablename-UUID directories created? (in relation to incremental backups)

261 views
Skip to first unread message

Johann Tagle

<johanntagle@gmail.com>
unread,
Aug 15, 2017, 5:19:54 AM8/15/17
to ScyllaDB users
Hello.  Wondering when are new tablename-UUID directories are created?  One book (Cassandra: the Definitive Guide) mentioned it is related to change in table schema.  What kind of changes can actually trigger this?  I tried adding another field to a table and doing a flush but no new directory is created.

I'm asking this in relation to doing incremental backups - right now I'm working on a script that only checks table directories that contains the name of the last snapshot (e.g. if tablename-UUID/snapshots/SNAPSHOT_NAME is present, then check tablename-UUID/backups/ for incremental backup files).  I need to know if I need to watch out for newer tablename-UUID directories that contain incremental backups that are also applicable to the last snapshot.

Thanks

Johann

Tomasz Grabiec

<tgrabiec@scylladb.com>
unread,
Aug 16, 2017, 6:09:15 AM8/16/17
to ScyllaDB users
On Tue, Aug 15, 2017 at 11:19 AM, Johann Tagle <johan...@gmail.com> wrote:
Hello.  Wondering when are new tablename-UUID directories are created?  One book (Cassandra: the Definitive Guide) mentioned it is related to change in table schema.  What kind of changes can actually trigger this?  I tried adding another field to a table and doing a flush but no new directory is created.

A table has a single UUID (and a single tablename-UUID directory) throughout its life time. The UUID is assigned on coordinator node when table creating statement is executed. The directories are created on replicas as they process schema change notifications.

You can get different tablename-UUID directories after you dropped a table and recreated with the same name. Only one table with given name is active at a time.

You can also end up with two directories if you try to create a table with given name concurrently on two different nodes. You shouldn't try to do that though (https://github.com/scylladb/scylla/issues/420).
 

I'm asking this in relation to doing incremental backups - right now I'm working on a script that only checks table directories that contains the name of the last snapshot (e.g. if tablename-UUID/snapshots/SNAPSHOT_NAME is present, then check tablename-UUID/backups/ for incremental backup files).  I need to know if I need to watch out for newer tablename-UUID directories that contain incremental backups that are also applicable to the last snapshot.

Thanks

Johann

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-users+unsubscribe@googlegroups.com.
To post to this group, send email to scylladb-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scylladb-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/scylladb-users/4cd86cb9-5e33-4674-b813-e9bcb46b392e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johann Tagle

<johanntagle@gmail.com>
unread,
Aug 17, 2017, 2:42:34 AM8/17/17
to ScyllaDB users
Thanks Tomasz!  


On Wednesday, August 16, 2017 at 6:09:15 PM UTC+8, Tomasz Grabiec wrote:
On Tue, Aug 15, 2017 at 11:19 AM, Johann Tagle <johan...@gmail.com> wrote:
Hello.  Wondering when are new tablename-UUID directories are created?  One book (Cassandra: the Definitive Guide) mentioned it is related to change in table schema.  What kind of changes can actually trigger this?  I tried adding another field to a table and doing a flush but no new directory is created.

A table has a single UUID (and a single tablename-UUID directory) throughout its life time. The UUID is assigned on coordinator node when table creating statement is executed. The directories are created on replicas as they process schema change notifications.

You can get different tablename-UUID directories after you dropped a table and recreated with the same name. Only one table with given name is active at a time.

You can also end up with two directories if you try to create a table with given name concurrently on two different nodes. You shouldn't try to do that though (https://github.com/scylladb/scylla/issues/420).
 

I'm asking this in relation to doing incremental backups - right now I'm working on a script that only checks table directories that contains the name of the last snapshot (e.g. if tablename-UUID/snapshots/SNAPSHOT_NAME is present, then check tablename-UUID/backups/ for incremental backup files).  I need to know if I need to watch out for newer tablename-UUID directories that contain incremental backups that are also applicable to the last snapshot.

Thanks

Johann

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-user...@googlegroups.com.
To post to this group, send email to scyllad...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages