cassandra - Why space usage is 0 although I had already inserted >40k rows -


currently, have 3 nodes cassandra.

i create table named events

after inserting >40k rows, perform following command in each node.

nodetool -h localhost cfstats 

this output 1 of node

table: events     sstable count: 0     space used (live): 0     space used (total): 0     space used snapshots (total): 43516     off heap memory used (total): 0     sstable compression ratio: 0.0     number of keys (estimate): 1     memtable cell count: 102675     memtable data size: 4224801     memtable off heap memory used: 0     memtable switch count: 1     local read count: 0     local read latency: nan ms     local write count: 4223     local write latency: 0.085 ms     pending flushes: 0     bloom filter false positives: 0     bloom filter false ratio: 0.00000     bloom filter space used: 0     bloom filter off heap memory used: 0     index summary off heap memory used: 0     compression metadata off heap memory used: 0     compacted partition minimum bytes: 0     compacted partition maximum bytes: 0     compacted partition mean bytes: 0     average live cells per slice (last 5 minutes): 0.0     maximum live cells per slice (last 5 minutes): 0.0     average tombstones per slice (last 5 minutes): 0.0     maximum tombstones per slice (last 5 minutes): 0.0 

to surprise, space used (live) , space used (total) 0. other nodes having 0 space used (live) , space used (total).

however, when perform select, can multiple rows being inserted previously.

may know, why space used (live) , space used (total) 0 nodes?

your memtables have not yet flushed disk. flush triggered few things:

  • the memtable reaching max threshold size
  • a commit log segment responsible data in memtable expiring
  • user calling nodetool flush

if insert 40k rows , nothing, long fit comfortably in memory, stay in memory. see no permanent disk usage rows since there no on-disk sstable holding values.

the persistence rows guaranteed commit-log, stores mutations in order in occurred on disk , can replayed in case of node failure. commit-log rolling log when commit-log segement expire, cassandra flush memtable holding data in segement on-disk sstable.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -