xiangfu0 opened a new pull request, #19945: URL: https://github.com/apache/pinot/pull/19945
When a document is added during a Lucene refresh, the delay listener can retain a conservative document count after the reader already exposes that document. Using this stale count for the `NOT TEXT_MATCH` document fence can omit indexed rows. Read the searchable count from an acquired searcher instead, and release its reference in all paths. Delay tracking keeps its existing semantics. Add a deterministic regression that inserts the third document between the production listener callback and the reader refresh. It verifies that the document is searchable, requires count 3, and checks that a no-op refresh preserves that count. Existing zero-document, multi-value, delay-metric, resource-lifetime, and negative-filter coverage is retained. The regression fails on the unmodified implementation with `expected [3] but found [2]`, matching the assertion in [this Unit Test Set 2 failure](https://github.com/apache/pinot/actions/runs/39209085222/job/117918235454). Validation on master baseline `179993a61b12d64300d333fdd72cf7529d7aa2e8`: - Before fix: the new regression failed with expected count 3, actual 2, after its query visibility assertion passed. - After fix: 108 tests passed (10 mutable-index, 5 refresh-listener, 6 resource-tracking, 87 filter-operator cases), with zero failures, errors, or skips and no retries. - Affected-module Spotless, license formatting, Checkstyle and license validation passed. - Production/test compilation used warning and deprecation flags; no warnings on added lines. Focused test command: `./mvnw -pl pinot-core -am -Dtest=LuceneMutableTextIndexTest,RealtimeLuceneRefreshListenerTest,RealtimeLuceneTextIndexResourceTrackingTest,FilterOperatorUtilsTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.compiler.showDeprecation=true -Dmaven.compiler.showWarnings=true test`. -- 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]
