I am using apache-cassandra-3.10
I understand instead of kill -9 pid, the only way to stop cassandra gracefully is nodetool stopdaemon.
But I want to know if nodetool stopdaemon also flushes the data in the memtables to sstables before shutdown.
If it does not flush then it would lead to data loss, when I stop the node using nodetool stopdaemon.
Also after researching on this , I read about the DURABLE_WRITES. What does durable write actually do ?
Also , the datastax documentation states under the section Setting DURABLE_WRITES "Do not set this attribute on a keyspace using the SimpleStrategy"
reference : https://docs.datastax.com/en/cql/3.1/cql/cql_reference/create_keyspace_r.html
What if my keyspace is configured with Simple Strategy , I still cannot benefit with DURABLE_WRITES in case it can help with data loss on shutdown ?
Is manually running nodetool flush before shutdown, the only way to make sure we do not lose data on shutdown ?
I read from https://issues.apache.org/jira/browse/CASSANDRA-3564 that the functionality to flush at shutdown has not been added.
Also there is a open ticket on the same issue https://issues.apache.org/jira/browse/CASSANDRA-12001
Intention is to avoid any data loss at shut down using nodetool stopdaemon. Basically flush all tables before shutdown , Considering Simple-strategy in use.