cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Low (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-8416) AssertionError 'Incoherent new size -1' during hints compaction
Date Wed, 03 Dec 2014 17:58:13 GMT
Richard Low created CASSANDRA-8416:

             Summary: AssertionError 'Incoherent new size -1' during hints compaction
                 Key: CASSANDRA-8416
             Project: Cassandra
          Issue Type: Bug
            Reporter: Richard Low

I've seen the error on 2.0.9:

java.lang.AssertionError: Incoherent new size -1 replacing [SSTableReader(path='/cassandra/d1/data/system/hints/system-hints-jb-24386-Data.db')]
by [] in View(pending_count=0, sstables=[], compacting=[SSTableReader(path='/cassandra/d1/data/system/hints/system-hints-jb-24386-Data.db')])

in logs during hints compaction. It looks like there are 2 concurrent compactions of the same
file - just before this error the logs say:

INFO [CompactionExecutor:220316] 2014-11-19 22:53:54,650 (line 115) Compacting
INFO [CompactionExecutor:220315] 2014-11-19 22:53:54,651 (line 115) Compacting

The assertion is:

int newSSTablesSize = sstables.size() - oldSSTables.size() + Iterables.size(replacements);
assert newSSTablesSize >= Iterables.size(replacements) : String.format("Incoherent new
size %d replacing %s by %s in %s", newSSTablesSize, oldSSTables, replacements, this);

So if the first compaction completes, the second one has sstables=[] (as seen in the assertion
failure print), so newSSTablesSize = 0 - 1 + 0 = -1 and we get the error.

It is possible the root cause is the same as CASSANDRA-7145. Does anyone know how to tell?
The error happens very rarely so hard to know from testing.

This message was sent by Atlassian JIRA

View raw message