[ 
https://issues.apache.org/jira/browse/CASSANDRA-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759961#action_12759961
 ] 

Teodor Sigaev commented on CASSANDRA-459:
-----------------------------------------

I'm very sorry, but patch could not be applied cleanly for cassandra-0.4:
% cat 
/spool/home/teodor/tmp/0001-CASSANDRA-459-flush-system-table-every-five-minutes.txt
 /spool/home/teodor/tmp/0002-logging.txt  | patch -p1 -C
....
Patching file src/java/org/apache/cassandra/db/CommitLog.java using Plan A...
Hunk #1 succeeded at 97 (offset 1 line).
Hunk #2 succeeded at 463 (offset -1 lines).
Hunk #3 succeeded at 514 (offset 1 line).
Hunk #4 failed at 532.
1 out of 4 hunks failed--saving rejects to 
src/java/org/apache/cassandra/db/CommitLog.java.rej
....

% cat src/java/org/apache/cassandra/db/CommitLog.java.rej
***************
*** 516,521 ****
                  }
                  else
                  {
                      BufferedRandomAccessFile logWriter = 
CommitLog.createWriter(oldFile);
                      writeCommitLogHeader(logWriter, 
oldCommitLogHeader.toByteArray());
                      logWriter.close();
--- 532,539 ----
                  }
                  else
                  {
+                     if (logger_.isDebugEnabled())
+                         logger_.debug("Not safe to delete commit log " + 
oldFile + "; dirty is " + oldCommitLogHeader.dirtyString());
                      BufferedRandomAccessFile logWriter = 
CommitLog.createWriter(oldFile);
                      writeCommitLogHeader(logWriter, 
oldCommitLogHeader.toByteArray());
                      logWriter.close();

It seems to me  that is not a stopper  to test. 


> Commitlog segments don't get deleted
> ------------------------------------
>
>                 Key: CASSANDRA-459
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-459
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.4, 0.5
>
>         Attachments: 
> 0001-CASSANDRA-459-flush-system-table-every-five-minutes.txt, 0002-logging.txt
>
>
> System table is not created with a periodic flush, so any update there (such 
> as storing token info) can prevent commitlog segments from being deleted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to