xiangfu0 commented on code in PR #19945:
URL: https://github.com/apache/pinot/pull/19945#discussion_r4321674025
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneTextIndex.java:
##########
@@ -339,8 +340,26 @@ public void close() {
public SearcherManager getSearcherManager() {
return _searcherManager;
}
+
@Override
public int getSearchableDocCount() {
- return _refreshListener.getLastRefreshNumDocs();
+ // The refresh listener records a lower bound that can miss documents
added during a refresh.
+ SearcherManager searcherManager = _searcherManager;
+ IndexSearcher indexSearcher = null;
+ try {
+ indexSearcher = searcherManager.acquire();
+ return indexSearcher.getIndexReader().numDocs();
Review Comment:
Changed to `maxDoc()` in e8a432f6056d95bc45ee85dcafe27591a30e7a41 and added
a comment explaining that deleted document slots remain within this document-ID
fence. Searcher acquisition/release is unchanged. The existing Lucene,
refresh-listener, resource-tracking and negative-filter cases all pass (108
tests); the combined run including the CI directory-isolation fix passed 251
tests with three parallel forks and zero failures, errors, skips or retries.
Thanks for the contract clarification.
--
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]