Fix conversion from long to int and back to long again.
(cherry picked from commit 1a91decf9f)
This commit is contained in:
Timothy Bish 2016-10-26 13:27:24 -04:00
parent e0116d0458
commit 941b861448
1 changed files with 4 additions and 5 deletions

View File

@ -936,17 +936,17 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter,
} else {
indexLock.writeLock().lock();
try {
return pageFile.tx().execute(new Transaction.CallableClosure<Integer, IOException>() {
return pageFile.tx().execute(new Transaction.CallableClosure<Long, IOException>() {
@Override
public Integer execute(Transaction tx) throws IOException {
public Long execute(Transaction tx) throws IOException {
StoredDestination sd = getStoredDestination(dest, tx);
LastAck cursorPos = getLastAck(tx, sd, subscriptionKey);
if (cursorPos == null) {
// The subscription might not exist.
return 0;
return 0l;
}
return (int) getStoredMessageSize(tx, sd, subscriptionKey);
return getStoredMessageSize(tx, sd, subscriptionKey);
}
});
} finally {
@ -955,7 +955,6 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter,
}
}
protected void recoverMessageStoreSubMetrics() throws IOException {
if (isEnableSubscriptionStatistics()) {