if (CompactionBound.UNLIMITED == bound) {
compationBound = HConstants.LATEST_TIMESTAMP;
} else if (CompactionBound.TX_UPPER_VISIBILITY_BOUND == bound) {</BUG>
TransactionSnapshot snapshot = cache.getLatestState();
<BUG>compationBound = snapshot != null ? snapshot.getVisibilityUpperBound() : 0;

} else {
compationBound = 0;
}
return compationBound;</BUG>
}

throws IOException {
Scan scan = new Scan(get);
scan.setMaxVersions();
scan.setFilter(Filters.combine(new IncrementFilter(), scan.getFilter()));
RegionScanner scanner = null;
try {
scanner = new IncrementSummingScanner(region, scan.getBatch(), region.getScanner(scan), ScanType.USER_SCAN);
scanner.next(results);
ctx.bypass();
} finally {
if (scanner != null) {
scanner.close();
