Skip to content

[improvement](compaction) split time series compaction score metric#63900

Draft
Yukang-Lian wants to merge 4 commits into
apache:masterfrom
Yukang-Lian:codex/time-series-compaction-score-metrics
Draft

[improvement](compaction) split time series compaction score metric#63900
Yukang-Lian wants to merge 4 commits into
apache:masterfrom
Yukang-Lian:codex/time-series-compaction-score-metrics

Conversation

@Yukang-Lian
Copy link
Copy Markdown
Collaborator

@Yukang-Lian Yukang-Lian commented May 29, 2026

What problem does this PR solve?

Time series cumulative compaction and size-based cumulative compaction shared the same max compaction score metric.

This PR:

  • adds tablet_time_series_max_compaction_score
  • keeps tablet_cumulative_max_compaction_score for size-based cumulative compaction
  • keeps BE report compatibility by reporting the max of base, size-based, and time-series scores
  • avoids lowering split cumulative policy score metrics when a capacity-limited local disk is skipped during a score check round
  • adds UT coverage for metric registration and size/time-series score buckets

Release note

None

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Add regression coverage for time-series compaction score zeroing, skipped policy score updates, empty scan behavior, and full local disk handling. Also avoid lowering cumulative policy score metrics when a capacity-limited disk is skipped and remove obsolete fallback metric update branches.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run --filter=DorisMetricsTest.Normal:TabletMgrTest.FindTabletWithCompact:TabletMgrTest.FindBestTabletsIgnoresUnsuitablePolicyScore:TabletMgrTest.GenerateCompactionTasksClearsMissingPolicyScoreOnCheck:TabletMgrTest.GenerateCompactionTasksKeepsMissingPolicyScoreWithoutCheck:TabletMgrTest.GenerateCompactionTasksDoesNotUpdateMetricWhenNoDirScanned:TabletMgrTest.GenerateCompactionTasksAggregatesScoreWhenNoSlot:TabletMgrTest.GenerateCompactionTasksDoesNotLowerPolicyScoreWhenDirFull:CloudCompactionTest.failure_base_compaction_tablet_sleep_test:CloudCompactionTest.failure_cumu_compaction_tablet_sleep_test:CloudCompactionTest.split_cumu_compaction_score_stats_before_filter:CloudCompactionTest.generate_cloud_compaction_tasks_updates_policy_metrics:CloudCompactionTest.generate_cloud_compaction_tasks_clears_metrics_without_tablets -j 16
- Behavior changed: No
- Does this need documentation: No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants