Database Reference
In-Depth Information
fault_time_to_live in seconds when creating or updating a table. To dis-
able TTL, set this property to 0. The default is zero.
CREATE TABLE ttl_demo (id uuid PRIMARY KEY, name
varchar)
WITH
default_time_to_live = 86400;
read_repair_chance : The dc_local_read_repair_chance speci-
fies the probability of performing a repair (making all replicas consistent) only in
the data center that received the read request. If it is set to 0.25, every fourth read
request will sync the whole data center. The default is 0.1.
There is a global version of dc_local_read_repair_chance , that is,
read_repair_chance . The read_repair_chance denotes the probabil-
ity by which repairs across all the data centers take place. By default, this value is
set to zero.
gc_grace_seconds : When a cell or a row is deleted, it is marked so by writ-
ing a tombstone. These tombstones aren't immediately removed on compaction.
Tombstones live till gc_grace_seconds before they become eligible to be re-
moved. The reason for the wait is to avoid deleted data from respawning. You
may ask how does it respawn. Let us assume that tombstones get removed imme-
diately. This is fine when all nodes are up. In a case where there is a dead node
carrying the data that was deleted, comes an issue. When the dead node comes
back to the life, it communicates with the other nodes to repair data. Since there is
no information about the deleted data as there is no tombstone, the dead node
thinks it has the only copy of the data, and it updates all the other nodes with the
data that should have been deleted. This would cause resurrection of a deleted re-
cord, which would be undesired. The default gc_grace_seconds is 864,000
or 10 days, which is probably enough time to notice a dead node and take appro-
priate action before garbage collection begins. On a single node setup this may be
set to zero.
index_interval : Each SSTable has an index summary loaded in the memory
that keeps a sample of row keys index in that SSTable. Cassandra 2.0.x releases
have a parameter named index_interval that basically dictates the number
of primary key or row key skipped in the sample. The default value for this is
128. This means that the index of every 128th record in the SSTable is kept in
memory. Talking of trade off, obviously the smaller the index_interval , the
Search WWH ::




Custom Search