Question: 1 / 115

What main function does the commit log serve in Cassandra?

Logs data operations in RAM

Stores data in an append-only format

The commit log serves a crucial role in Cassandra as it is responsible for ensuring durability and reliability of the data. Its primary function is to store data in an append-only format. This means that every write operation is recorded sequentially in the commit log before it is processed and written to its final location in the SSTables. This append-only format is beneficial because it allows for quick writes and also provides a reliable mechanism for recovering data in the event of a failure.

During write operations, data is first appended to the commit log, which guarantees that even if there is a power failure or crash, the data can be recovered from the log, maintaining data integrity. Once the data is safely recorded in the commit log, it can later be flushed to disk and structured into SSTables, which allows for efficient read and storage operations.

The other options do not accurately reflect the primary function of the commit log:

- Logging data operations in RAM doesn't capture the essence of the commit log's function; instead, it operates in persistent storage.

- While the commit log can facilitate data processing, it is not primarily designed for real-time processing; its main role is to provide durability.

- Acting as a cache implies temporary storage for fast access, which is not the function of

Facilitates real-time data processing

Acts as a cache for frequently accessed data

Next

Report this question