cassandra-commits mailing list archives

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


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:
>             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:
> 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 (line
135) Exception in thread Thread[COMMIT-LOG-WRITER,5,main]
> java.nio.BufferOverflowException
> 	at java.nio.Buffer.nextPutIndex(
> 	at java.nio.DirectByteBuffer.putLong(
> 	at org.apache.cassandra.db.commitlog.CommitLogSegment.write(
> 	at org.apache.cassandra.db.commitlog.CommitLog$
> 	at org.apache.cassandra.db.commitlog.PeriodicCommitLogExecutorService$1.runMayThrow(
> 	at
> 	at
> Possibly related to

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:

View raw message