apache / apache/lucene

Review and refactor synchronization handling between MockDirectoryWrapper and CheckIndex [LUCENE-10071]

Open
#11,109 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:core/index module:test-framework type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This is a spin-off issue from discussion in  as we noticed there's a subtle way to cause deadlock in test (or maybe even in production code if similar logic is implemented)  

This issue is to review how synchronization can be improved between these classes to make it less deadlock-prone, or more explicit when locking arrangement needs to be made.

---
Migrated from [LUCENE-10071](https://issues.apache.org/jira/browse/LUCENE-10071) by Zach Chen (@zacharymorn), updated Aug 28 2021

Contributor guide

Open the contributing guide

Research direction

Start by reviewing synchronization between MockDirectoryWrapper and CheckIndex, then read the linked pull request discussion and its deadlock scenario. Determine how the locking arrangement can be made less deadlock-prone or made explicit. Done means the coordination between these classes has a clearly justified synchronization design.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.