fix: use max in flushed entry id and topic latest entry id (#5946)

This commit is contained in:
Yuhan Wang
2025-04-23 07:48:32 +08:00
committed by GitHub
parent 7e5f6cbeae
commit 919956999b

View File

@@ -113,8 +113,10 @@ impl LeaderRegionManifestInfo {
pub fn prunable_entry_id(&self) -> u64 {
match self {
LeaderRegionManifestInfo::Mito {
flushed_entry_id, ..
} => *flushed_entry_id,
flushed_entry_id,
topic_latest_entry_id,
..
} => (*flushed_entry_id).max(*topic_latest_entry_id),
LeaderRegionManifestInfo::Metric {
data_flushed_entry_id,
data_topic_latest_entry_id,