0
votes

I want to do a backup with snapshot,and when i restore by the backup, i find i lost some data.

Then i had do a test like that: i create a table, when i insert first data and carried out flush,i can see some file generate in data path,but when i insert second data, i carried out flush too,but there is nothing generate in data path

i want each time i insert data and flush i can see there are some file generated in data path.but just first time i can see files generate in data path,after first will be failed.

1
Do you see any error when you attempt the 2nd flush? Can you provide a list of files in the directory for the flushed table during the various stages you're testing? - stage 1: before the first flush - stage 2: after the first flush - stage 3: after the second flush. - Lyuben Todorov
How many nodes in your Cassandra cluster and What is your RF? - LetsNoSQL

1 Answers

0
votes

My hunch is that you're using multiple nodes in your cluster, your RF does not equal the total number of nodes, and because of that, the particular record you're inserting most likely resides on a different node. Because of that, when you flush the node you're on, you don't see any new files generated. If you have multiple nodes in the cluster, you can run "nodetool getendpoints" command (supply the keyspace , table and partition key values). It will tell you which nodes have that partition key (row). The other options is to set your RF=TotalNodeCount. That will ensure the data you insert resides on all nodes. Then you can run flush from any node and you should see a new file generated.

-Jim