fix: [2.5] InvertedIndexTantivy/JsonInvertedIndex should also follow scalar index mmap in 2.5. #42626#48875
fix: [2.5] InvertedIndexTantivy/JsonInvertedIndex should also follow scalar index mmap in 2.5. #42626#48875lmzzzzz1 wants to merge 1 commit intomilvus-io:2.5from
Conversation
…ilvus-io#42626) Cherry-pick PRs milvus-io#42676 and milvus-io#42788 from master to 2.5 branch with conflict resolution. PR milvus-io#42676: Refactor text/json index temp build paths to avoid cross-field conflicts. Replace hardcoded TMP_*_PREFIX constants with DiskFileManagerImpl methods (GetLocalTempTextIndexPrefix, GetLocalTempJsonKeyIndexPrefix). PR milvus-io#42788: Add mmap configuration support for InvertedIndex, TextMatch, and JsonKeyStats indexes. When enable_mmap=true, indexes load via mmap (MmapDirectory); when false, files are read into RAM (RamDirectory) and local files are cleaned up early. Key adaptations for 2.5 branch: - Keep 2.5's path helpers (GetIndexPathPrefixWithBuildID, GetTextIndexIdentifier, GetJsonKeyIndexIdentifier) - Add load_fs_index_into_ram_directory() in util.rs as standalone function (consistent with upstream tantivy fork's open_in_dir_in_ram API style) since 2.5's tantivy version (0.21.2-fix4) lacks this API - Use isDataMmapEnable(f) for text/json indexes (already in 2.5) - Pass enable_mmap through Proto -> CGo -> C++ -> Rust full chain Signed-off-by: 1mmortal <lmzzzzz1@163.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lmzzzzz1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@lmzzzzz1 Please associate the related pr of master to the body of your Pull Request. (eg. "pr: #") |
|
[INFO] PR Label Summary by Default
[WARNING] Milestone not set
You can set milestone by commenting: Use /refresh-label to update related check and label manually |
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## 2.5 #48875 +/- ##
===========================================
- Coverage 82.10% 48.20% -33.90%
===========================================
Files 1128 1046 -82
Lines 179181 172381 -6800
===========================================
- Hits 147110 83099 -64011
- Misses 26099 82270 +56171
- Partials 5972 7012 +1040
🚀 New features to boost your workflow:
|
This PR backports PR #42676 and #42788 from master to the 2.5 branch.
The relevant issue has already been addressed in master and 2.6. This PR brings the same changes into 2.5 to keep behavior consistent across branches.
Any conflicts encountered during cherry-picking have been resolved.
see also: #42626