Merge Threads unnecessarily block on SerialMergeScheduler [LUCENE-5310]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I have been working on a high level merge multiplexer that shares threads across different IW instances and I came across the fact that SerialMergeScheduler actually blocks incoming thread is a merge in going on. Yet this blocks threads unnecessarily since we pull the merges in a loop anyway. We should use a tryLock operation instead of syncing the entire method?
---
Migrated from [LUCENE-5310](https://issues.apache.org/jira/browse/LUCENE-5310) by Simon Willnauer (@s1monw), updated May 09 2016
Attachments: [LUCENE-5310.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5310/LUCENE-5310.patch) (versions: 7)
Contributor guide
Research direction
Start by locating the SerialMergeScheduler entry point and read how merge requests are pulled while another merge is running. Review the attached LUCENE-5310.patch for context, then verify that incoming merge threads no longer block unnecessarily and that existing merge-scheduler tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100