[
https://issues.apache.org/jira/browse/SOLR-7115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321814#comment-14321814
]
Mark Miller commented on SOLR-7115:
-----------------------------------
The follow gets through the tests, but I'd have to do some more studying to
understand if it's right.
{noformat}
Index: solr/core/src/java/org/apache/solr/update/UpdateLog.java
===================================================================
--- solr/core/src/java/org/apache/solr/update/UpdateLog.java (revision
1659862)
+++ solr/core/src/java/org/apache/solr/update/UpdateLog.java (working copy)
@@ -608,8 +608,10 @@
// since we're changing the log, we must change the map.
newMap();
+ TransactionLog logToDecRef = null;
if (prevTlog != null) {
globalStrings = prevTlog.getGlobalStrings();
+ logToDecRef = prevTlog;
}
// since document additions can happen concurrently with commit, create
@@ -618,6 +620,10 @@
prevTlog = tlog;
tlog = null;
id++;
+
+ if (logToDecRef != null) {
+ logToDecRef.decref();
+ }
}
}
{noformat}
> UpdateLog can miss closing transaction log objects.
> ---------------------------------------------------
>
> Key: SOLR-7115
> URL: https://issues.apache.org/jira/browse/SOLR-7115
> Project: Solr
> Issue Type: Bug
> Reporter: Mark Miller
>
> I've seen this happen on YourKit and in various tests - especially since
> adding resource release tracking to the log objects. Now I've got a test that
> catches it in SOLR-7113.
> It seems that in precommit, if prevTlog is not null, we need to close it
> because we are going to overwrite prevTlog with a new log.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]