This commit is contained in:
Dmitry Kryukov 2026-08-01 14:11:46 +03:00 committed by GitHub
commit ff1633d170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View File

@ -275,10 +275,11 @@ public class CompactionController extends AbstractCompactionController
{
if (memtable.getMinTimestamp() != Memtable.NO_MIN_TIMESTAMP)
{
if (memtable.rowIterator(key) != null)
{
minTimestampSeen = Math.min(minTimestampSeen, memtable.getMinTimestamp());
hasTimestamp = true;
try (UnfilteredRowIterator iterator = memtable.rowIterator(key)) {
if (iterator != null) {
minTimestampSeen = Math.min(minTimestampSeen, memtable.getMinTimestamp());
hasTimestamp = true;
}
}
}
}

View File

@ -196,10 +196,11 @@ public class Ballots
private static Row getRow(DecoratedKey key, TableMetadata metadata, ColumnFamilyStore paxos, Memtable memtable)
{
final ClusteringComparator comparator = paxos.metadata.get().comparator;
UnfilteredRowIterator iter = memtable.rowIterator(key, Slices.with(comparator, Slice.make(comparator.make(metadata.id))), ColumnFilter.NONE, false, SSTableReadsListener.NOOP_LISTENER);
if (iter == null || !iter.hasNext())
return null;
return (Row) iter.next();
try (UnfilteredRowIterator iter = memtable.rowIterator(key, Slices.with(comparator, Slice.make(comparator.make(metadata.id))), ColumnFilter.NONE, false, SSTableReadsListener.NOOP_LISTENER)) {
if (iter == null || !iter.hasNext())
return null;
return (Row) iter.next();
}
}
public static long latestBallotFromBaseTable(DecoratedKey key, TableMetadata metadata)