Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Gangadhara M.B avatar image
Gangadhara M.B asked ·

Is the data appended to the commitlog not sorted?

[FOLLOW UP QUESTION TO #2069]

Does it means data get appended to commit log but not stored in sorted format immediately ?

What will happen to the client requests which comes before coalese/compaction process runs . When client/application tries to read same data which just got inserted but not got coalesced yet ? does query becomes expensive because it has to query and sort the data then serve/respond to the client which could consume more time and system resources ?

commitlog
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

That's correct. By definition, "appends" mean that mutations (writes) are added to the end of the commitlog segment. This is done to make writes really fast in Cassandra by avoiding the overhead of disk seeks.

Cassandra does not just serve reads from disk -- data in memtables also get merged and are included in the result set returned to the clients.

For more info, see How data is read in Cassandra. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.