apache / apache/lucene

Questionable/Underspecified behavior of DirectoryReader.getIndexCommit() on NRT Readers [LUCENE-9040]

Open
#10,082 4 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:core/index type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

It seems like DirectoryReader.getIndexCommit() returns weird
results when using a "reopened" reader off of uncommited IW changes.

Even though 2 diff readers will expose diff views of the index, they will
claim to refer to the same IndexCommit (generation).

Original email thread (no replies): http://mail-archives.apache.org/mod_mbox/lucene-dev/201910.mbox/%3Calpine.DEB.2.21.1910301611190.8171%40slate%3E

---
Migrated from [LUCENE-9040](https://issues.apache.org/jira/browse/LUCENE-9040) by Chris M. Hostetter (@hossman), updated Nov 19 2019
Attachments: [LUCENE-9040.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-9040/LUCENE-9040.patch)
Linked issues:
- [SOLR-13908](https://issues.apache.org/jira/browse/SOLR-13908)
- [SOLR-13872](https://issues.apache.org/jira/browse/SOLR-13872)

Contributor guide

Open the contributing guide

Research direction

Start with DirectoryReader.getIndexCommit() and the NRT reader behavior described for readers reopened from uncommitted IndexWriter changes. Reproduce the case with two readers exposing different index views, then inspect the LUCENE-9040.patch attachment and related SOLR issues. Done should establish and test the expected IndexCommit behavior for these readers.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.