You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f48b3e8
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](be) Make index_tool MATCH_ALL run and fail when it cannot read postings
### What problem does this PR solve?
Issue Number: None
Related PR: #68758
Problem Summary: `index_tool --operation=term_query --pred_type=match_all` had
two problems. The query builds a RuntimeState, whose constructor registers
memory trackers, but the tool never initialized them, so the command crashed
before reading the index; master has the same code. Past that, MATCH_ALL runs
its terms through run_clucene_leaf, which returns a Status instead of
throwing. When the postings could not be read, search() printed the error,
then the count of the incomplete result, and the tool exited 0.
term_query now initializes the memory trackers, as meta_tool does. search()
returns the query status and prints no count when the query fails, and
term_query prints the error and exits with -1, as it does when CLucene throws.
The MATCH_ALL setup moves into match_all(), which keeps search() within the
function size limit.
### Release note
None
### Check List (For Author)
- Test: Manual test. On the V1 fixture x86_new_1744025019684.idx, MATCH_ALL
of `gif` on `request` crashed before the change and now reports 37337 rows,
the same as MATCH. On a copy whose _0.frq length is set to zero, so the
dictionary opens and the postings read fails, the tool with only the
tracker change printed `Term queried count:0` and exited 0; with the whole
change it prints the read error and exits 255.
- Behavior changed: No
- Does this need documentation: No
0 commit comments