Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54D15E1EB for ; Tue, 29 Jan 2013 21:03:14 +0000 (UTC) Received: (qmail 18381 invoked by uid 500); 29 Jan 2013 21:03:13 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 18345 invoked by uid 500); 29 Jan 2013 21:03:13 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 18224 invoked by uid 99); 29 Jan 2013 21:03:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 21:03:13 +0000 Date: Tue, 29 Jan 2013 21:03:12 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CASSANDRA-5191) BufferOverflowException in CommitLogSegment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-5191?page=3Dcom.atla= ssian.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 it= s clock is ahead, reads it as a DeletedColumn (see ExpiredColumn.create). CommitLog$LogRecordAdder checks to see if there is enough room for he mutat= ion (hasCapacityFor). DeletedColumn says, I'm X bytes. Then CommitLogSegm= ent.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. =20 > 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=C3=A9 Borgqvist > Attachments: BufferOverflowTest.java > > > Running mixed reads, writes and deletes on a single column family in a tw= o 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 > =09at java.nio.Buffer.nextPutIndex(Buffer.java:499) > =09at java.nio.DirectByteBuffer.putLong(DirectByteBuffer.java:756) > =09at org.apache.cassandra.db.commitlog.CommitLogSegment.write(CommitLogS= egment.java:265) > =09at org.apache.cassandra.db.commitlog.CommitLog$LogRecordAdder.run(Comm= itLog.java:382) > =09at org.apache.cassandra.db.commitlog.PeriodicCommitLogExecutorService$= 1.runMayThrow(PeriodicCommitLogExecutorService.java:50) > =09at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java= :30) > =09at 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 administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira