nuvo / cain

Backup and restore tool for Cassandra on Kubernetes
Apache License 2.0
32 stars 21 forks source link

Error restore when two tables have similar name #25

Open ignaciogonzalezsomoza opened 4 years ago

ignaciogonzalezsomoza commented 4 years ago

Good afternoon, We have a problem when performing a restore, and only for one table. Our bbdd system contains a keyspace in which two tables have a similar name: table1 with name 'queue' and table2 with name 'queue_metadata'. The restore process reports an 'Error with table queue found 2 directories' error but it isn't true. Is it possible that being the full name of table1 included in the name of table2 the code located in path.go returns the error incorrectly? (Maybe in GetListOfFilesFromK8s) (The problem is not in the directory structure; the rest of the keyspaces do the restore properly, the error only occurs in the indicated table) Note: the data structure belong to a external system (uber cadence) and we can't change the name of the table. Thanks in advance.

maorfr commented 4 years ago

Can you paste the full output? What you describe makes sense and we'll need to add a fix for that (PR is welcome!)

ignaciogonzalezsomoza commented 4 years ago

This is the log from the pod which raise the error: (and a hardcopy with the bucket list files)

XXX@XXX-VirtualBox  ~  k logs cassandra-cassandra-cadence-restore 2020/05/25 16:12:46 Restore started! 2020/05/25 16:12:46 Getting clients 2020/05/25 16:12:46 Getting pods 2020/05/25 16:12:46 Testing existence of data dir 2020/05/25 16:12:47 Getting current schema 2020/05/25 16:12:47 Found schema: e98def 2020/05/25 16:12:47 Calculating paths. This may take a while... 2020/05/25 16:12:48 Error with table domains, found 2 directories

image

aslamkhan-atlan commented 1 year ago

Do we have any resolution to this? I am seeing similar problem