more feedback

This commit is contained in:
Simon Willnauer 2019-05-29 20:09:17 +02:00
parent fceee244dd
commit 086088e699
2 changed files with 2 additions and 1 deletions

View File

@ -169,7 +169,7 @@ final class DocumentsWriter implements Closeable, Accountable {
private synchronized long applyDeleteOrUpdate(ToLongFunction<DocumentsWriterDeleteQueue> function) throws IOException {
// This method is synchronized to make sure we don't replace the deleteQueue while applying this update / delete
// otherwise we might loose an update / delete if this happens concurrently to a full flush.
// otherwise we might lose an update / delete if this happens concurrently to a full flush.
final DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue;
long seqNo = function.applyAsLong(deleteQueue);
flushControl.doOnDelete();

View File

@ -252,6 +252,7 @@ final class DocumentsWriterDeleteQueue implements Accountable, Closeable {
}
private FrozenBufferedUpdates freezeGlobalBufferInternal(final Node<?> currentTail ) {
assert globalBufferLock.isHeldByCurrentThread();
if (globalSlice.sliceTail != currentTail) {
globalSlice.sliceTail = currentTail;
globalSlice.apply(globalBufferedUpdates, BufferedUpdates.MAX_INT);