cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12539) Empty CommitLog prevents restart
Date Wed, 08 Feb 2017 17:11:41 GMT


Benjamin Lerer commented on CASSANDRA-12539:





The patches for 2.2 and 3.0 are the same and the patches for 3.11 and trunk arethe same.

The patch removes the use of {{RandomAccessFile}} to resize the commitlog segment file.
As we do not recycle the CommitLog files in 2.2, it is not needed anymore. The creation of
the {{MappedByteBuffer}} will automatically set the size of the file to {{DatabaseDescriptor.getCommitLogSegmentSize()}}.

By not using an extra file pointer with the {{RandomAccessFile}}, we avoid the problem that
had cause the empty commit log (which was running out of file pointers when resizing the file

[~JoshuaMcKenzie] do you want to review it? 

> Empty CommitLog prevents restart
> --------------------------------
>                 Key: CASSANDRA-12539
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stefano Ortolani
>            Assignee: Benjamin Lerer
> A node just crashed (known cause: CASSANDRA-11594) but to my surprise (unlike other time)
restarting simply fails.
> Checking the logs showed:
> {noformat}
> ERROR [main] 2016-08-25 17:05:22,611 - Exiting due to error
while processing commit log during initialization.
> org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: Could not
read commit log descriptor in file /data/cassandra/commitlog/CommitLog-6-1468235564433.log
> 	at org.apache.cassandra.db.commitlog.CommitLogReplayer.handleReplayError(
> 	at org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(
> 	at org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(
> 	at org.apache.cassandra.db.commitlog.CommitLog.recover( [apache-cassandra-3.0.8.jar:3.0.8]
> 	at org.apache.cassandra.db.commitlog.CommitLog.recover( [apache-cassandra-3.0.8.jar:3.0.8]
> 	at org.apache.cassandra.service.CassandraDaemon.setup( [apache-cassandra-3.0.8.jar:3.0.8]
> 	at org.apache.cassandra.service.CassandraDaemon.activate( [apache-cassandra-3.0.8.jar:3.0.8]
> 	at org.apache.cassandra.service.CassandraDaemon.main( [apache-cassandra-3.0.8.jar:3.0.8]
> INFO  [main] 2016-08-25 17:08:56,944 - Configuration
location: file:/etc/cassandra/cassandra.yaml
> {noformat}
> Deleting the empty file fixes the problem.

This message was sent by Atlassian JIRA

View raw message