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/702a0065 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/702a0065 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/702a0065 Branch: refs/heads/activemq-5.9 Commit: 702a0065ddffb18e375635cbd56439489033a60f Parents: a675bd9 Author: Hiram Chirino <[email protected]> Authored: Fri Nov 1 12:08:19 2013 -0400 Committer: Hadrian Zbarcea <[email protected]> Committed: Tue Mar 11 21:20:20 2014 -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/702a0065/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
