I'm going to play around with the batch mutation stuff a little, but
in the meantime I have some more information about the addDeletion
problem.
Before calling addDeletion(key, cf), if I list TEST_CF in the cli, it
shows the one row and the two super columns with two subcolumns each,
as expected. After calling execute(), the row still shows up (not
expected), but the super columns within it are gone. It looks like
it's behaving as if it's truncating the row.
I'm not entirely sure at this point what I might have to do to make
sure cassandra really deletes those supercolumns internally, so I used
nodetool and flushed/compacted/scrubbed the TEST keyspace and the
TEST_CF cf.
At this point, list TEST_CF still shows the row. I waited 10 hours
and then re-ran the tests again, hoping that the first counter
inserted (TEST/TEST_CF/counter_super_test/1234567900/"1") would equal
50 (incrementing +50 from non-existence). This turned out not to be
the case. All the counter values are 4x what they should be, which
makes sense since I ran the tests 3 times already and haven't deleted
the keyspace from the cli to force the issue.
[default@TEST] list TEST_CF;
Using default limit of 100
-------------------
RowKey: counter_super_test
=> (super_column=1234567900,
(counter=1, value=200)
(counter=2, value=40))
=> (super_column=1234568200,
(counter=2, value=40)
(counter=3, value=80))
1 Row Returned.
Here are the lines from cassandra system.log from last night when I
was running nodetool commands against it:
INFO [RMI TCP Connection(22)-127.0.0.1] 2011-06-10 01:28:09,008
ColumnFamilyStore.java (line 1011) Enqueuing flush of Memtable-
TEST_CF@967966535(720/900 serialized/live bytes, 15 ops)
INFO [FlushWriter:8] 2011-06-10 01:28:09,009 Memtable.java (line 237)
Writing Memtable-TEST_CF@967966535(720/900 serialized/live bytes, 15
ops)
INFO [FlushWriter:8] 2011-06-10 01:28:09,016 Memtable.java (line 254)
Completed flushing /var/lib/cassandra/data/TEST/TEST_CF-g-1-Data.db
(373 bytes)
ERROR [CompactionExecutor:21] 2011-06-10 01:28:22,329
CompactionManager.java (line 510) insufficient space to compact even
the two smallest files, aborting
INFO [CompactionExecutor:22] 2011-06-10 01:28:43,479
CompactionManager.java (line 632) Scrubbing SSTableReader(path='/var/
lib/cassandra/data/TEST/TEST_CF-g-1-Data.db')
INFO [CompactionExecutor:22] 2011-06-10 01:28:43,545
CompactionManager.java (line 773) Scrub of SSTableReader(path='/var/
lib/cassandra/data/TEST/TEST_CF-g-1-Data.db') complete: 1 rows in new
sstable and 0 empty (tombstoned) rows dropped
INFO [NonPeriodicTasks:1] 2011-06-10 01:28:53,529 SSTable.java (line
159) Deleted /var/lib/cassandra/data/system/Schema-g-16
I saw that the "insufficient space to compact" is a bug in the 0.8
release. I did a quick poke and changed the min_compaction_threshold
as they suggested, but it had no effect (same message).