i set my column family gcgraceseconds to 0; but stills rowkey is not deleted it remains in my column family
create column family workInfo123
with column_type = 'Standard'
and comparator = 'UTF8Type'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type'
and read_repair_chance = 0.1
and dclocal_read_repair_chance = 0.0
and populate_io_cache_on_flush = true
and gc_grace = 0
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and caching = 'KEYS_ONLY'
and default_time_to_live = 0
and speculative_retry = 'NONE'
and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor'}
and index_interval = 128;
see below the view of
[default@winoriatest] list workInfo123;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: a
-------------------
RowKey: xx
2 Rows Returned.
Elapsed time: 17 msec(s).
i am using cassandra -cli should i have change anything else
UPDATE:-
after using ./nodetool -host 127.0.0.1 compact
[default@winoriatest] list workInfo123;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: xx
2 Rows Returned.
Elapsed time: 11 msec(s).
why xx
remains ??
When you delete a row in Cassandra, it does not get deleted straight away. Instead it is marked with a tombstone. The effect is, that you still get a result for the key, but no columns will be delivered. The tombstone is required because
For the row and its tombstone to be removed a compaction is required. This process re-organizes the data files and while it does that, it prunes deleted rows. That is, if the GC grace period of the tombstone has been reached. For single-node(!) clusters it is OK to set the grace period to 0 because the delete does not have to be propagated to any other node (that might be down at the point in time you issued the delete).
If you want to enforce the removal of deleted rows, you can trigger a flush (sync memory with data files) and a major compaction via the nodetool utility. E.g.
After the compaction completes, the deleted rows should truly be gone.