fix leveldb variant of org.apache.activemq.bugs.AMQ2584Test - add rudimentary size calculation to leveldb

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1423854 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-12-19 13:09:26 +00:00
parent 7400977609
commit d1292441a2
2 changed files with 3 additions and 1 deletions

View File

@ -436,6 +436,8 @@ class LevelDBClient(store: LevelDBStore) {
def tempIndexFile = directory / ("temp"+INDEX_SUFFIX) def tempIndexFile = directory / ("temp"+INDEX_SUFFIX)
def snapshotIndexFile(id:Long) = create_sequence_file(directory,id, INDEX_SUFFIX) def snapshotIndexFile(id:Long) = create_sequence_file(directory,id, INDEX_SUFFIX)
def size: Long = logRefs.size * store.logSize
def createLog: RecordLog = { def createLog: RecordLog = {
new RecordLog(logDirectory, LOG_SUFFIX) new RecordLog(logDirectory, LOG_SUFFIX)
} }

View File

@ -528,7 +528,7 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P
} }
def size: Long = { def size: Long = {
return 0 return db.client.size
} }
def checkpoint(sync: Boolean): Unit = db.checkpoint(sync) def checkpoint(sync: Boolean): Unit = db.checkpoint(sync)