Skip to content

[fix](test) fix flaky compaction profile case - #63886

Merged
morningman merged 1 commit into
apache:branch-4.0from
Yukang-Lian:lianyukang/pick-4.0-61222-compaction-profile
Jun 9, 2026
Merged

[fix](test) fix flaky compaction profile case#63886
morningman merged 1 commit into
apache:branch-4.0from
Yukang-Lian:lianyukang/pick-4.0-61222-compaction-profile

Conversation

@Yukang-Lian

Copy link
Copy Markdown
Collaborator

Summary

Fix DORIS-25488: test_compaction_profile_action was flaky because it checked input size on the first unfiltered compaction profile, which may belong to another tablet.

This PR checks those fields on the profile filtered by the test tablet id.

…file with tablet_id

The unfiltered compaction_profiles[0] may belong to other tablets,
whose input_data_size could be 0. Move data-size assertions to use
tablet_id-filtered profile to ensure we validate our own compaction.

(cherry picked from commit 067b66e)
@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?

@Yukang-Lian

Copy link
Copy Markdown
Collaborator Author

run buildall

@Yukang-Lian

Copy link
Copy Markdown
Collaborator Author

run p0

@Yukang-Lian

Copy link
Copy Markdown
Collaborator Author

run cloud_p0

1 similar comment
@Yukang-Lian

Copy link
Copy Markdown
Collaborator Author

run cloud_p0

@morningman
morningman merged commit cb705a2 into apache:branch-4.0 Jun 9, 2026
29 of 32 checks passed
@Yukang-Lian

Copy link
Copy Markdown
Collaborator Author

For tracking: master already contains the equivalent fix via #61222 (commit 4640c70).

That commit applies the same test-side change in regression-test/suites/compaction/test_compaction_profile_action.groovy: move the input_data_size, input_rowsets_count, and input_row_num assertions from the first unfiltered profile to the tablet_id-filtered tabletProfile.

hello-stephen pushed a commit that referenced this pull request Jul 16, 2026
)

Related PR: #63886

Problem Summary:

`test_compaction_profile_action` queried `/api/compaction/profile` on
the first backend returned by `SHOW BACKENDS`, independently of the
target tablet placement. The profile API reads the selected BE's
process-local compaction tracker, so the tablet filter returned an empty
list whenever that backend was the one BE outside the target tablet's
three-replica set.

The branch-4.1 P0 history shows 13 failures in 32 runs. In every
failure, the queried first backend was outside the target replica set;
in every passing run, it hosted a target replica.

This change derives the profile endpoint from the `BackendId` in the
same `SHOW TABLETS` row as the selected `TabletId`. The case therefore
queries a replica that participates in `trigger_and_wait_compaction`
while preserving all existing API assertions.
github-actions Bot pushed a commit that referenced this pull request Jul 16, 2026
)

Related PR: #63886

Problem Summary:

`test_compaction_profile_action` queried `/api/compaction/profile` on
the first backend returned by `SHOW BACKENDS`, independently of the
target tablet placement. The profile API reads the selected BE's
process-local compaction tracker, so the tablet filter returned an empty
list whenever that backend was the one BE outside the target tablet's
three-replica set.

The branch-4.1 P0 history shows 13 failures in 32 runs. In every
failure, the queried first backend was outside the target replica set;
in every passing run, it hosted a target replica.

This change derives the profile endpoint from the `BackendId` in the
same `SHOW TABLETS` row as the selected `TabletId`. The case therefore
queries a replica that participates in `trigger_and_wait_compaction`
while preserving all existing API assertions.
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.

3 participants