What will happen if write to memtable fails but write to commit log succeeds in Cassandra writes?

Viewed 80

I have a question regarding the WAL + memtable writes in Cassandra. By default until WAL and memtable are both updated, Cassandra doesn't mark the write as complete. However, if the WAL succeeds and the memtable write fails, isn't Cassandra in inconsistent state?

I mean the memtable is volatile, if the memory crashes it is rebuilt from the WAL. So if a write which was only successful in WAL but not memtable, won't it mistakenly show up in memtable if it is generated from WAL?

1 Answers

In all my time working with users/developers/customers working on hundreds of clusters, I've never come across a situation where a memtable update failed but the mutation was persisted to the commit log.

You haven't provided any details on why you think it is possible at all or how to replicate the issue. If you do, I'd be happy to update my answer. Cheers!

Related