You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/10/20 02:36:27 UTC
[lucene-solr] 01/02: @1033 Cleanup UpdateLog.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 0f236d5d71f90d0081175ce51650c2ac6d81a3a2
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Oct 19 21:35:32 2020 -0500
@1033 Cleanup UpdateLog.
---
.../src/java/org/apache/solr/update/UpdateLog.java | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index 7b64fcd..30b6792 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -1475,20 +1475,16 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
log.decref();
log.forceClose();
}
- } finally {
- tlogLock.unlock();
- }
- if (bufferTlog != null) {
- tlogLock.lock();
- try {
+ if (bufferTlog != null) {
+
// should not delete bufferTlog on close, existing bufferTlog is a sign for skip peerSync
bufferTlog.deleteOnClose = false;
bufferTlog.decref();
bufferTlog.forceClose();
- } finally {
- tlogLock.unlock();
}
+ } finally {
+ tlogLock.unlock();
}
try {
this.close();
@@ -1715,11 +1711,6 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
tlog.incref();
logList.addFirst(tlog);
}
- } finally {
- tlogLock.unlock();
- }
- tlogLock.lock();
- try {
if (bufferTlog != null) {
bufferTlog.incref();
logList.addFirst(bufferTlog);
@@ -1907,7 +1898,7 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
// after replay, update the max from the index
log.info("Re-computing max version from index after log re-play.");
-// / maxVersionFromIndex = null;
+ maxVersionFromIndex = null;
getMaxVersionFromIndex();
versionInfo.unblockUpdates();