mirror of https://github.com/apache/cassandra
Fix Journal segment allocation/switch race condition
Patch by Alex Petrov; reviewed by Aleksey Yeschenko for CASSANDRA-19866
This commit is contained in:
parent
00ebcdc9f2
commit
1866b8ec73
|
|
@ -198,6 +198,10 @@ public class Journal<K, V> implements Shutdownable
|
|||
|
||||
public boolean isFlushed(RecordPointer recordPointer)
|
||||
{
|
||||
Segment<K, V> current = currentSegment;
|
||||
if (current.descriptor.timestamp == recordPointer.segment)
|
||||
return current.isFlushed(recordPointer.position);
|
||||
|
||||
return segments.get().isFlushed(recordPointer);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue