You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by el...@apache.org on 2012/08/20 10:10:44 UTC
svn commit: r1374940 -
/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java
Author: elecharny
Date: Mon Aug 20 08:10:44 2012
New Revision: 1374940
URL: http://svn.apache.org/viewvc?rev=1374940&view=rev
Log:
Apply the journal if we have one even if the file does not exist
Modified:
labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java
Modified: labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java
URL: http://svn.apache.org/viewvc/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java?rev=1374940&r1=1374939&r2=1374940&view=diff
==============================================================================
--- labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java (original)
+++ labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/BTree.java Mon Aug 20 08:10:44 2012
@@ -551,6 +551,13 @@ public class BTree<K, V>
journal.createNewFile();
withJournal = true;
+
+ // If the journal is not empty, we have to read it
+ // and to apply all the modifications to the current file
+ if ( journal.length() > 0 )
+ {
+ applyJournal();
+ }
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org