You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/11/01 17:13:38 UTC

git commit: Fix for: https://issues.apache.org/jira/browse/AMQ-4837 : LevelDB corrupted in AMQ cluster.

Updated Branches:
  refs/heads/trunk ec4c2d946 -> 190da2969


Fix for: https://issues.apache.org/jira/browse/AMQ-4837 : LevelDB corrupted in AMQ cluster.

- The tracked flushed offset was not getting initialized to match the initial size of the log file.  This invalid flushed offset was being used to do the initial sync /w the slave and then things went downhill.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/190da296
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/190da296
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/190da296

Branch: refs/heads/trunk
Commit: 190da29691cbebaf8bd315ad6b8be02f64cbb6b2
Parents: ec4c2d9
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Fri Nov 1 12:08:19 2013 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Fri Nov 1 12:13:33 2013 -0400

----------------------------------------------------------------------
 .../src/main/scala/org/apache/activemq/leveldb/RecordLog.scala     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/190da296/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/RecordLog.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/RecordLog.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/RecordLog.scala
index 1dc94aa..d35becd 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/RecordLog.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/RecordLog.scala
@@ -118,7 +118,7 @@ case class RecordLog(directory: File, logSuffix:String) {
       force
     }
 
-    val flushed_offset = new AtomicLong(0)
+    val flushed_offset = new AtomicLong(append_offset)
 
     def append_position = {
       position+append_offset