You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by Apache Wiki <wi...@apache.org> on 2015/12/01 03:22:54 UTC

[Cassandra Wiki] Update of "WritePathForUsers" by MichaelEdge

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "WritePathForUsers" page has been changed by MichaelEdge:
https://wiki.apache.org/cassandra/WritePathForUsers?action=diff&rev1=25&rev2=26

  = Cassandra Write Path =
- This section provides an overview of the Cassandra Write Path for users of Cassandra. Cassandra developers, who work on the Cassandra source code, should refer to the [[Architecture Internals|ArchitectureInternals]] developer documentation for a more detailed overview.
+ This section provides an overview of the Cassandra Write Path for users of Cassandra. Cassandra developers, who work on the Cassandra source code, should refer to the [[ArchitectureInternals|Architecture Internals]] developer documentation for a more detailed overview.
  
  {{attachment:CassandraWritePath.png|text describing image|width=800}}
  
@@ -20, +20 @@

   1. If the write request is a DELETE operation (whether a delete of a column or a row), a tombstone marker is written to the Commit Log and MemTable to indicate the delete.
   1. If row caching is used, invalidate the cache for that row. Row cache is populated on read only, so it must be invalidated when data for that row is written.
   1. Acknowledge the write request back to the local coordinator.
- The local coordinator waits for the appropriate number of acknowledgements (dependent on the consistency level for this write request) before acknowledging back to the client.
+ The local coordinator waits for the appropriate number of acknowledgements from the replica nodes (dependent on the consistency level for this write request) before acknowledging back to the client.
  == Flushing MemTables ==
  MemTables are flushed to disk based on various factors, some of which include:
   * commitlog_total_space_in_mb is exceeded
@@ -44, +44 @@

   1. Write the Statistics File
   1. Purge the written data from the Commit Log
  == Unavailable Replica Nodes and Hinted Handoff ==
- When a local coordinator is unable to send data to a replica node due to the replica node being unavailable, the local coordinator stores the data in its local system.hints table; this process is known as Hinted Handoff. The data is stored for a default period of 3 hours. When the replica node comes back online the coordinator node will send the data to the replica node.
+ When a local coordinator is unable to send data to a replica node due to the replica node being unavailable, the local coordinator stores the data either in its local system.hints table (prior to Cassandra v3.0) or in a local flat file (from Cassandra v3.0 onwards); this process is known as Hinted Handoff and is configured in cassandra.yaml. Hint data is stored for a default period of 3 hours, configurable using the max_hint_window_in_ms property in cassandra.yaml. If the replica node comes back online within the hinted handoff window the local coordinator will send the data to the replica node, otherwise the hint data is discarded and the replica node will need to be repaired.
  == Write Path Advantages ==
   * The write path is one of Cassandra’s key strengths: for each write request one sequential disk write plus one in-memory write occur, both of which are extremely fast.
   * During a write operation, Cassandra never reads before writing, never rewrites data, never deletes data and never performs random I/O.