You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mikhail Khludnev (JIRA)" <ji...@apache.org> on 2016/10/14 06:11:20 UTC
[jira] [Commented] (SOLR-7115) UpdateLog can miss closing
transaction log objects.
[ https://issues.apache.org/jira/browse/SOLR-7115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574375#comment-15574375 ]
Mikhail Khludnev commented on SOLR-7115:
----------------------------------------
{code}
- synchronized (solrCoreState.getUpdateLock()) {
- if (ulog != null) ulog.preSoftCommit(cmd);
- if (cmd.openSearcher) {
- core.getSearcher(true, false, waitSearcher);
- } else {
- // force open a new realtime searcher so realtime-get and versioning code can see the latest
- RefCounted<SolrIndexSearcher> searchHolder = core.openNewSearcher(true, true);
- searchHolder.decref();
+ try{
+ synchronized (solrCoreState.getUpdateLock()) {
+ if (ulog != null) ulog.preSoftCommit(cmd);
+ if (cmd.openSearcher) {
+ core.getSearcher(true, false, waitSearcher);
+ } else {
+ // force open a new realtime searcher so realtime-get and versioning code can see the latest
+ RefCounted<SolrIndexSearcher> searchHolder = core.openNewSearcher(true, true);
+ searchHolder.decref();
+ }
+ if (ulog != null) {
+ ulog.postSoftCommit(cmd);
+ }
}
- if (ulog != null) ulog.postSoftCommit(cmd);
}
- if (ulog != null) ulog.postCommit(cmd); // postCommit currently means new searcher has
- // also been opened
+ finally{
+ if (ulog != null) {
+ ulog.postCommit(cmd); // postCommit currently means new searcher has
+ // also been opened
+ }
+ }
}
{code}
Please have a look...
> 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
> Fix For: 6.3
>
> Attachments: SOLR-7115-LargeVolumeEmbeddedTest-fail.txt, SOLR-7115.patch, SOLR-7115.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org