This is an automated email from the ASF dual-hosted git repository.
airborne12 pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new e5b3453098e branch-4.2: [fix](filecache) Preserve peer cache
statistics in incremental profile reports (#68987)
e5b3453098e is described below
commit e5b3453098e0f6fa2b8a00abcc6e15ad15e1dfed
Author: linrrarity <[email protected]>
AuthorDate: Tue Oct 13 14:20:04 2026 +0800
branch-4.2: [fix](filecache) Preserve peer cache statistics in incremental
profile reports (#68987)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
On branch-4.2, `diff_file_cache_statistics()` omits ten peer cache
fields, causing incremental profile reports to lose cross-CG and same-CG
read counts, bytes and timers, peer race results, and lazy fetch
statistics.
The SNII backport (#68584) added assertions covering these fields
without including the corresponding delta calculations already present
on master. This causes three FileCacheProfileReporterTest cases to fail.
Add the missing field calculations to preserve these statistics in
incremental reports.
### Release note
None
---
be/src/io/cache/block_file_cache_profile.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/be/src/io/cache/block_file_cache_profile.cpp
b/be/src/io/cache/block_file_cache_profile.cpp
index d63ff9cf3a2..6e4222dbc11 100644
--- a/be/src/io/cache/block_file_cache_profile.cpp
+++ b/be/src/io/cache/block_file_cache_profile.cpp
@@ -143,6 +143,17 @@ FileCacheStatistics diff_file_cache_statistics(const
FileCacheStatistics& curren
SUBTRACT_FIELD(segment_footer_index_bytes_write_into_cache);
SUBTRACT_FIELD(remote_only_on_miss_triggered);
SUBTRACT_FIELD(remote_only_on_miss_threshold_bytes);
+
+ SUBTRACT_FIELD(num_cross_cg_peer_io_total);
+ SUBTRACT_FIELD(bytes_read_from_cross_cg_peer);
+ SUBTRACT_FIELD(cross_cg_peer_io_timer);
+ SUBTRACT_FIELD(num_same_cg_peer_io_total);
+ SUBTRACT_FIELD(bytes_read_from_same_cg_peer);
+ SUBTRACT_FIELD(same_cg_peer_io_timer);
+ SUBTRACT_FIELD(num_peer_race_peer_win);
+ SUBTRACT_FIELD(num_peer_race_s3_win);
+ SUBTRACT_FIELD(num_peer_lazy_fetch);
+ SUBTRACT_FIELD(peer_lazy_fetch_timer);
#undef SUBTRACT_FIELD
return diff;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]