kotman12 opened a new pull request, #3477:
URL: https://github.com/apache/solr/pull/3477

   ---------
   
   https://issues.apache.org/jira/browse/SOLR-17863
   
   # Description
   
   [SOLR-16713](https://issues.apache.org/jira/browse/SOLR-16713) introduced a 
race condition into the perSegmentFingerprintCache as it changed it from the 
[thread-safe guava implementation to the thread-UNSAFE 
WeakHashMap](https://github.com/apache/solr/commit/375ac647ad507638686848c549c30e6c077dca1b#diff-3bf44f923643744a743460bb0f64301618dd7529a602d945fe2f7f193d4cdde0).
 This flew under the radar for some time because this map previously had very 
little contention between threads. However after 
[SOLR-17756](https://issues.apache.org/jira/browse/SOLR-17756) we turbo-charged 
the race after parallelizing at a much more granular level upstream of this 
call. The net effect is that WeakHashMap:put can get stuck in an infinite-loop 
(probably due to a cycle in the underlying linked-list that it modifies):
   
   # Solution
   
   Please provide a short description of the approach taken to implement your 
solution.
   
   # Tests
   
   It is hard to recreate this reliably. I've been able to reproduce by 
increasing the amount of segments written by `SolrIndexFingerprintTest` to ~500 
although this does take some time. 
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [X] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [X] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [X] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [X] I have developed this patch against the `main` branch.
   - [X] I have run `./gradlew check`.
   - [X ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to