closedTransactions = ImmutableMap.of();
}
- purgedTransactions.add(Range.singleton(ul));
+ purgedTransactions.add(Range.closedOpen(ul, UnsignedLong.ONE.plus(ul)));
LOG.debug("{}: finished purging inherited transaction {}", persistenceId(), id);
envelope.sendSuccess(new TransactionPurgeResponse(id, request.getSequence()), readTime() - now);
});
// purged transactions in one go. If it does, we warn about the situation and
LOG.warn("{}: transaction {} not tracked in {}, but not present in active transactions", persistenceId,
id, purgedTransactions);
- purgedTransactions.add(Range.singleton(ul));
+ purgedTransactions.add(Range.closedOpen(ul, UnsignedLong.ONE.plus(ul)));
return new TransactionPurgeResponse(id, request.getSequence());
}
tree.purgeTransaction(id, () -> {
- purgedTransactions.add(Range.singleton(ul));
+ purgedTransactions.add(Range.closedOpen(ul, UnsignedLong.ONE.plus(ul)));
transactions.remove(id);
LOG.debug("{}: finished purging transaction {}", persistenceId(), id);
envelope.sendSuccess(new TransactionPurgeResponse(id, request.getSequence()), readTime() - now);
}
// XXX: do we need to account for cookies?
- purgedHistories.add(Range.singleton(UnsignedLong.fromLongBits(historyId.getHistoryId())));
+ final UnsignedLong ul = UnsignedLong.fromLongBits(historyId.getHistoryId());
+ purgedHistories.add(Range.closedOpen(ul, UnsignedLong.ONE.plus(ul)));
LOG.debug("{}: Purged history {}", historyId);
}
}
LOG.debug("{}: purging history {}", persistenceId, id);
- purgedHistories.add(Range.singleton(UnsignedLong.fromLongBits(id.getHistoryId())));
+ final UnsignedLong ul = UnsignedLong.fromLongBits(id.getHistoryId());
+ purgedHistories.add(Range.closedOpen(ul, UnsignedLong.ONE.plus(ul)));
existing.purge(request.getSequence(), envelope, now);
return null;
}