Repository navigation
[fix](cloud) Skip global packed index probe when opening files of committed rowsets - #69980
Conversation
…mitted rowsets ### What problem does this PR solve? Issue Number: None Related PR: apache#64995 Problem Summary: A cloud BE logs a burst of WARN lines with a full stack trace like meet error status: [NOT_FOUND]File not found in global packed index: data/<tablet>/<rowset>_0.idx while compaction reads its input rowsets. In one instance a 4-hour BE log had 42k such lines over 21k paths in 158 tablets, yet every compaction succeeded. Reproduce: write a rowset whose segment file is smaller than small_file_threshold_bytes (so it is packed) but whose inverted index file is larger (so it is uploaded as a regular object), then compact or query it. Each open of the regular .idx file prints the WARN with a stack, twice per compaction (eligibility check and the merge itself). Root cause: apache#64995 made PackedFileSystem::open_file_impl fall back to PackedFileManager::get_packed_slice_location when a path is not in _index_map, so that the file cache preload can read back a segment of the rowset being written, whose rowset meta does not exist yet. The fallback was added unconditionally, so it also runs for a PackedFileSystem built from a rowset meta. That index map already holds every packed slice of the rowset, so a miss means a regular file, and the probe can only fail. The failure is a Status::NotFound, and NOT_FOUND records a stack trace and logs a WARN as soon as it is constructed, before the caller falls back to opening the regular file. Fix: - Only consult the manager when the index map is not initialized, i.e. on the write path, the same split exists_impl and file_size_impl already make. - Return NOT_FOUND without a stack trace from get_packed_slice_location: on the write path a miss is also expected, for files too large to be packed. After the fix, reading committed rowsets no longer takes the global index lock or logs anything for regular files; the write-path preload still finds packed slices through the manager. ### Release note Fix noisy "File not found in global packed index" WARN logs with stack traces when reading rowsets that mix packed and regular files in cloud mode. ### Check List (For Author) - Test: Unit Test - Added PackedFileSystemTest.OpenFileOfRowsetBeingWrittenUsesManagerLocation and PackedFileSystemTest.OpenRegularFileOfOpenedRowsetIgnoresManager; PackedFileSystemTest.* (24 tests) pass on an ASAN UT build. - PackedFileManagerTest.GetMergeFileIndexForUnknownPathReturnsNotFound passes. PackedFileManagerTest.AppendSmallFileSuccess crashes in FileCacheFactory::get_by_path when the suite is run on its own; it crashes the same way without this change. - Behavior changed: Yes. A PackedFileSystem built from rowset meta no longer looks paths up in the in-memory global packed index. - Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
|
run buildall |
|
Codex automated review failed and did not complete. Error: Selected model is at capacity. Please try a different model. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
TPC-H: Total hot run time: 28862 ms |
TPC-DS: Total hot run time: 151683 ms |
ClickBench: Total hot run time: 24.19 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
|
Codex automated review failed and did not complete. Error: Selected model is at capacity. Please try a different model. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
Local pipeline review — ✅ PASSschema: doris-repo-review/v1
status: PASS
pr: apache/doris#69980
commit: 9f29cdb4295e4be94cc3178a6a9e778642c357b4
base: 49bfbdecffb5b37aeadb0982700533e8daf7768d
reviewed_at: 2026-11-04T16:07+08:00
reviewer: gavinchou
model: gpt-6-astra
effort: xhigh
findings: {blocker: 0, major: 0, minor: 1, nit: 0}
rounds: 1
converged: trueNotes for maintainers
Reviewed locally with the |
…mitted rowsets (#69980) ### What problem does this PR solve? Issue Number: None Related PR: #64995 Problem Summary: A cloud BE logs a burst of WARN lines with a full stack trace like meet error status: [NOT_FOUND]File not found in global packed index: data/<tablet>/<rowset>_0.idx while compaction reads its input rowsets. In one instance a 4-hour BE log had 42k such lines over 21k paths in 158 tablets, yet every compaction succeeded. Reproduce: write a rowset whose segment file is smaller than small_file_threshold_bytes (so it is packed) but whose inverted index file is larger (so it is uploaded as a regular object), then compact or query it. Each open of the regular .idx file prints the WARN with a stack, twice per compaction (eligibility check and the merge itself). Root cause: #64995 made PackedFileSystem::open_file_impl fall back to PackedFileManager::get_packed_slice_location when a path is not in _index_map, so that the file cache preload can read back a segment of the rowset being written, whose rowset meta does not exist yet. The fallback was added unconditionally, so it also runs for a PackedFileSystem built from a rowset meta. That index map already holds every packed slice of the rowset, so a miss means a regular file, and the probe can only fail. The failure is a Status::NotFound, and NOT_FOUND records a stack trace and logs a WARN as soon as it is constructed, before the caller falls back to opening the regular file. Fix: - Only consult the manager when the index map is not initialized, i.e. on the write path, the same split exists_impl and file_size_impl already make. - Return NOT_FOUND without a stack trace from get_packed_slice_location: on the write path a miss is also expected, for files too large to be packed. After the fix, reading committed rowsets no longer takes the global index lock or logs anything for regular files; the write-path preload still finds packed slices through the manager. ### Release note Fix noisy "File not found in global packed index" WARN logs with stack traces when reading rowsets that mix packed and regular files in cloud mode.
…files of committed rowsets #69980 (#70235) Cherry-picked from #69980 Co-authored-by: Xin Liao <[email protected]>
What problem does this PR solve?
Issue Number: None
Related PR: #64995
Problem Summary:
A cloud BE logs a burst of WARN lines with a full stack trace like
while compaction reads its input rowsets. In one instance a 4-hour BE log had 42k
such lines over 21k paths in 158 tablets, yet every compaction succeeded.
Reproduce: write a rowset whose segment file is smaller than
small_file_threshold_bytes (so it is packed) but whose inverted index file is
larger (so it is uploaded as a regular object), then compact or query it. Each
open of the regular .idx file prints the WARN with a stack, twice per compaction
(eligibility check and the merge itself).
Root cause: #64995 made PackedFileSystem::open_file_impl fall back to
PackedFileManager::get_packed_slice_location when a path is not in _index_map,
so that the file cache preload can read back a segment of the rowset being
written, whose rowset meta does not exist yet. The fallback was added
unconditionally, so it also runs for a PackedFileSystem built from a rowset
meta. That index map already holds every packed slice of the rowset, so a miss
means a regular file, and the probe can only fail. The failure is a
Status::NotFound, and NOT_FOUND records a stack trace and logs a WARN as soon as
it is constructed, before the caller falls back to opening the regular file.
Fix:
write path, the same split exists_impl and file_size_impl already make.
write path a miss is also expected, for files too large to be packed.
After the fix, reading committed rowsets no longer takes the global index lock
or logs anything for regular files; the write-path preload still finds packed
slices through the manager.
Release note
Fix noisy "File not found in global packed index" WARN logs with stack traces
when reading rowsets that mix packed and regular files in cloud mode.
Check List (For Author)
and PackedFileSystemTest.OpenRegularFileOfOpenedRowsetIgnoresManager;
PackedFileSystemTest.* (24 tests) pass on an ASAN UT build.
PackedFileManagerTest.AppendSmallFileSuccess crashes in
FileCacheFactory::get_by_path when the suite is run on its own; it crashes
the same way without this change.
looks paths up in the in-memory global packed index.