cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-2968) AssertionError during compaction of CF with counter columns
Date Mon, 01 Aug 2011 17:24:10 GMT


Sylvain Lebresne updated CASSANDRA-2968:

    Attachment: 2968.patch

This is actually a pretty stupid bug (not that there is smart bug): the old NodeId for the
local node were read from the system table in reversed order while they shouldn't. The wrong
path was then taken based on that mistake. No data was lost due to that (i.e, the total value
of the counters is preserved), but non-sensical counter context were created (hence triggering
the assertion).

Fixing the root cause is pretty straightforward. Fixing the nonsensical counter contexts is
more subtle, but it is doable up to the fact that the local NodeId on the node(s) where the
assertion is triggered will have to be renewed. Attaching a patch that does both (fixing root
cause and repairing the bad data). Also add two unit tests, one for the root cause and one
to check that the bad data repair code does what it is supposed to do.

After applying that patch (or upgrading on a release shipping it), you will (potentially)
need to restart the node with the -Dcassandra.renew_counter_id=true (compaction will still
fail if you don't but with a message saying that you should restart with the startup flag).

> AssertionError during compaction of CF with counter columns
> -----------------------------------------------------------
>                 Key: CASSANDRA-2968
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.8.2
>         Environment: CentOS release 5.6
>            Reporter: Taras Puchko
>            Assignee: Sylvain Lebresne
>             Fix For: 0.8.3
>         Attachments: 2968.patch, AffiliateActivity-g-147-Data.db, AffiliateActivity-g-147-Index.db,
AffiliateActivity-g-195-Data.db, AffiliateActivity-g-195-Index.db
> Having upgraded from 0.8.0 to 0.8.2 we ran nodetool compact and got
> Error occured during compaction
> java.util.concurrent.ExecutionException: java.lang.AssertionError
>         at java.util.concurrent.FutureTask$Sync.innerGet(
>         at java.util.concurrent.FutureTask.get(
>         at org.apache.cassandra.db.compaction.CompactionManager.performMajor(
>         at org.apache.cassandra.db.ColumnFamilyStore.forceMajorCompaction(
>         at org.apache.cassandra.service.StorageService.forceTableCompaction(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(
>         at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(
>         at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(
>         at com.sun.jmx.mbeanserver.PerInterface.invoke(
>         at com.sun.jmx.mbeanserver.MBeanSupport.invoke(
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(
>         at
>         at$200(
>         at$
>         at
>         at
>         at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at sun.rmi.server.UnicastServerRef.dispatch(
>         at sun.rmi.transport.Transport$
>         at Method)
>         at sun.rmi.transport.Transport.serviceCall(
>         at sun.rmi.transport.tcp.TCPTransport.handleMessages(
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(
>         at sun.rmi.transport.tcp.TCPTransport$
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
>         at java.util.concurrent.ThreadPoolExecutor$
>         at
> Caused by: java.lang.AssertionError                                                 
>         at org.apache.cassandra.db.context.CounterContext.removeOldShards(
>         at org.apache.cassandra.db.CounterColumn.removeOldShards(
>         at org.apache.cassandra.db.CounterColumn.removeOldShards(
>         at org.apache.cassandra.db.compaction.PrecompactedRow.<init>(
>         at org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(
>         at org.apache.cassandra.db.compaction.CompactionIterator.getReduced(
>         at org.apache.cassandra.db.compaction.CompactionIterator.getReduced(
>         at org.apache.cassandra.utils.ReducingIterator.computeNext(
>         at
>         at
>         at org.apache.commons.collections.iterators.FilterIterator.setNextObject(
>         at org.apache.commons.collections.iterators.FilterIterator.hasNext(
>         at org.apache.cassandra.db.compaction.CompactionManager.doCompactionWithoutSizeEstimation(
>         at org.apache.cassandra.db.compaction.CompactionManager.doCompaction(
>         at org.apache.cassandra.db.compaction.CompactionManager$
>         at java.util.concurrent.FutureTask$Sync.innerRun(       
>         at                 
>         ... 3 more

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message