You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2015/05/24 16:27:17 UTC
[jira] [Resolved] (SOLR-7585) ConcurrentLFUCache throws
NoSuchElementException under a write-heavy load
[ https://issues.apache.org/jira/browse/SOLR-7585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shawn Heisey resolved SOLR-7585.
--------------------------------
Resolution: Fixed
Fix Version/s: 5.2
Trunk
Assignee: Shawn Heisey
Committed to trunk, branch_5x, and lucene_solr_5_2. Precommit passed for each. Also made sure that the new test failed without the fix and passed with the fix. Thanks for figuring this out, [~maciej.zasada]!
> ConcurrentLFUCache throws NoSuchElementException under a write-heavy load
> -------------------------------------------------------------------------
>
> Key: SOLR-7585
> URL: https://issues.apache.org/jira/browse/SOLR-7585
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.1
> Reporter: Maciej Zasada
> Assignee: Shawn Heisey
> Priority: Minor
> Fix For: Trunk, 5.2
>
> Attachments: SOLR-7585.patch, SOLR-7585.patch, SOLR-7585.patch, SOLR-7585.patch, SOLR-7585.patch
>
>
> Under a write-heavy load {{ConcurrentLFUCache}} throws {{NoSuchElementException}}. The problem lies within {{org.apache.solr.util.ConcurrentLFUCache#put}} method, which allows for a race condition between the check and the call to {{markAndSweep}} method. Despite that a thread must acquire a lock to perform sweeping, it's still possible that multiple threads successfully detected a need for calling markAndSweep. If they execute it sequentially, subsequent runs will fail with {{NoSuchElementException}}.
--
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