cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-5191) BufferOverflowException in CommitLogSegment
Date Tue, 29 Jan 2013 21:03:12 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis resolved CASSANDRA-5191.
---------------------------------------

    Resolution: Won't Fix

You're right, it has to do with the short ttl.

What happens is, node 1 sends an ExpiredColumn to node 2 (ColumnSerializer.serialize).  Node
2 reads it (ColumnSerializer.deserialize), but because its clock is ahead, reads it as a DeletedColumn
(see ExpiredColumn.create).

CommitLog$LogRecordAdder checks to see if there is enough room for he mutation (hasCapacityFor).
 DeletedColumn says, I'm X bytes.  Then CommitLogSegment.write goes to write the actual data,
but it's over-clever, and re-uses the bytes it was originally sent from node 1, which was
the ExpiringColumn, which is 8 bytes larger.

This is fixed in 1.2 thanks to the MessagingService rewrite there, but for 1.1 you'll have
to either use a longer ttl or sync your clocks better.
                
> BufferOverflowException in CommitLogSegment
> -------------------------------------------
>
>                 Key: CASSANDRA-5191
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5191
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.9
>         Environment: RHEL 2.6.32-220.el6.x86_64, jdk1.6.0_27
>            Reporter: André Borgqvist
>         Attachments: BufferOverflowTest.java
>
>
> Running mixed reads, writes and deletes on a single column family in a two node cluster.
After a few minutes the following appears in the system log:
> ERROR [COMMIT-LOG-WRITER] 2013-01-25 12:49:55,955 AbstractCassandraDaemon.java (line
135) Exception in thread Thread[COMMIT-LOG-WRITER,5,main]
> java.nio.BufferOverflowException
> 	at java.nio.Buffer.nextPutIndex(Buffer.java:499)
> 	at java.nio.DirectByteBuffer.putLong(DirectByteBuffer.java:756)
> 	at org.apache.cassandra.db.commitlog.CommitLogSegment.write(CommitLogSegment.java:265)
> 	at org.apache.cassandra.db.commitlog.CommitLog$LogRecordAdder.run(CommitLog.java:382)
> 	at org.apache.cassandra.db.commitlog.PeriodicCommitLogExecutorService$1.runMayThrow(PeriodicCommitLogExecutorService.java:50)
> 	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
> 	at java.lang.Thread.run(Thread.java:662)
> Possibly related to https://issues.apache.org/jira/browse/CASSANDRA-3615

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message