activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject activemq git commit: Implements https://issues.apache.org/jira/browse/AMQ-5458 - Also needed to update the slave since it does writes slightly differently.
Date Wed, 26 Nov 2014 13:36:47 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 4141d6a22 -> f4149c0a4


Implements https://issues.apache.org/jira/browse/AMQ-5458 - Also needed to update the slave
since it does writes slightly differently. 


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

Branch: refs/heads/trunk
Commit: f4149c0a46a3ab92eebbeb1895fd484d3ad29ebb
Parents: 4141d6a
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Wed Nov 26 08:36:32 2014 -0500
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Wed Nov 26 08:36:43 2014 -0500

----------------------------------------------------------------------
 .../activemq/leveldb/replicated/SlaveLevelDBStore.scala | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/f4149c0a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
index 8720987..0eddb0f 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/SlaveLevelDBStore.scala
@@ -192,7 +192,8 @@ class SlaveLevelDBStore extends LevelDBStore with ReplicatedLevelDBStoreTrait
{
             trace("%s, Slave WAL update: (file:%s, offset: %d, length: %d)".format(directory,
value.file.toHexString, value.offset, value.length))
             val file = client.log.next_log(value.file)
             val buffer = map(file, value.offset, value.length, false)
-            session.codec.readData(buffer, ^{
+
+            def readData = session.codec.readData(buffer, ^{
               if( value.sync ) {
                 buffer.force()
               }
@@ -208,6 +209,15 @@ class SlaveLevelDBStore extends LevelDBStore with ReplicatedLevelDBStoreTrait
{
                 send_wal_ack
               }
             })
+
+            if( client.log.recordLogTestSupport!=null ) {
+              client.log.recordLogTestSupport.writeCall.call {
+                readData
+              }
+            } else {
+              readData
+            }
+
           case LOG_DELETE_ACTION =>
 
             val value = JsonCodec.decode(command.body, classOf[LogDelete])


Mime
View raw message