Remove unused segNo calculation in IndexWriter.doFlush (#13491)

This commit is contained in:
zhouhui 2024-07-02 00:29:10 +08:00 committed by GitHub
parent 5f91d609ea
commit 3cd406e783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 7 deletions

View File

@ -4270,13 +4270,7 @@ public class IndexWriter
synchronized (fullFlushLock) { synchronized (fullFlushLock) {
boolean flushSuccess = false; boolean flushSuccess = false;
try { try {
long seqNo = docWriter.flushAllThreads(); anyChanges = (docWriter.flushAllThreads() < 0);
if (seqNo < 0) {
seqNo = -seqNo;
anyChanges = true;
} else {
anyChanges = false;
}
if (!anyChanges) { if (!anyChanges) {
// flushCount is incremented in flushAllThreads // flushCount is incremented in flushAllThreads
flushCount.incrementAndGet(); flushCount.incrementAndGet();