Cassandra captures magazine clarification

I have read several documents regarding the Cassandra transaction log, and there is conflicting information for me about this “structure (s)”. The diagram shows that when recording occurs, Cassandra writes to memory and logs. Confusing the part where this commit log is located.

The chart I was looking at shows the commit log on disk. However, if you read a little more, they also talk about the commit log buffer in memory — and that part of the memory is flushed to disk every 10 seconds.

The DataStax documentation says: “When recording is in progress, Cassandra stores the data in a memory structure called memtable, and to provide custom durability, it also adds records to the commit log buffer in memory. This buffer is flushed to disk every 10 seconds.”

Nowhere in their diagram do they display a memory structure called a commit log buffer. They display only the commit log on disk.

It also says: "When recording occurs, Cassandra stores data in a structure in memory, in memory, and also adds records to the commit log on disk."

Therefore, I am confused by the above. Is it written to the commit log memory buffer, which is eventually flushed to disk (which I would also call a commit log), or is it written to memory and writes the log to disk?

The Apache documentation states the following: “Instead, like other modern systems, Cassandra provides longevity by adding entries to the transaction log first. This means that only commitlog should be fsync'd, which, if commitlog is on its own volume, eliminates need to search because commitlog is append only, implementation details are in ArchitectureCommitLog.

Cassandra commitlog_sync , commitlog commitlog_sync_period_in_ms , , . "

, Apache, , - ( ) ( , , , / "d).

, DataStax, - , .

- , , ?

, , ( DataStax ). , , .

+4
1

, - , , . , fsyncs. " " , Cassandra. , , .

Cassandra fsync .

commitlog_sync 
    (Default: periodic) The method that Cassandra uses to acknowledge writes in milliseconds:
    periodic: (Default: 10000 milliseconds [10 seconds])
    Used with commitlog_sync_period_in_ms to control how often the commit log is synchronized to disk. Periodic syncs are acknowledged immediately.

    batch: (Default: disabled)note
    Used with commitlog_sync_batch_window_in_ms (Default: 2 ms) to control how long Cassandra waits for other writes before performing a sync. When using this method, writes are not acknowledged until fsynced to disk.

periodic , . batch .

+5

Source: https://habr.com/ru/post/1648659/


All Articles