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

This commit is contained in:
Hiram Chirino 2014-11-26 08:36:32 -05:00
parent 4141d6a223
commit f4149c0a46
1 changed files with 11 additions and 1 deletions

View File

@ -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])