Fix synchronization in LocalCheckpointTracker#contains (#38755)
We are accessing the `CountedBitSet` in `LocalCheckpointTracker#contains` without proper synchronization. Relates #33871
This commit is contained in:
parent
225ebb6935
commit
eca5404572
|
@ -157,11 +157,11 @@ public class LocalCheckpointTracker {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final long bitSetKey = getBitSetKey(seqNo);
|
final long bitSetKey = getBitSetKey(seqNo);
|
||||||
final CountedBitSet bitSet;
|
final int bitSetOffset = seqNoToBitSetOffset(seqNo);
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
bitSet = processedSeqNo.get(bitSetKey);
|
final CountedBitSet bitSet = processedSeqNo.get(bitSetKey);
|
||||||
|
return bitSet != null && bitSet.get(bitSetOffset);
|
||||||
}
|
}
|
||||||
return bitSet != null && bitSet.get(seqNoToBitSetOffset(seqNo));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue