[fix](regression) Select compaction profile BE by tablet replica - #65552
Conversation
### What problem does this PR solve? Issue Number: N/A Related PR: apache#63886 Problem Summary: The compaction profile regression case queried the first backend returned by SHOW BACKENDS, while the target tablet could be placed on the other three backends. Because the compaction profile API reads a BE-local tracker, the tablet filter returned an empty profile list whenever the selected backend did not host the target tablet. Select the backend from the same SHOW TABLETS row as the target tablet so the query reaches a replica that executed the compaction. ### Release note None ### Check List (For Author) - Test: Manual test - Built the regression framework with Maven and parsed the updated Groovy suite with GroovyShell. - Behavior changed: No. This only stabilizes regression-test BE routing. - Does this need documentation: No.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Jul 20th, 2026 12:23 AM. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
|
/review |
There was a problem hiding this comment.
I found no blocking issues in this PR.
Critical checkpoint conclusions:
- Goal and correctness: the change makes the compaction profile test query the BE that owns the selected tablet, which matches the local nature of
/api/compaction/profileand the helper's per-tablet compaction routing. - Scope: the patch is small and focused on the flaky backend selection in one regression test.
- Concurrency/lifecycle/config/compatibility/persistence/data-write paths: no production code or runtime contract is changed; the reviewed behavior is test-side BE selection.
- Parallel paths: compaction helpers and nearby tests already route tablet-specific HTTP calls through
tablet.BackendId; this patch aligns the profile query with that pattern. - Test coverage: the PR adjusts an existing p0 regression test. I did not run tests in this review environment, per the prompt's no-build/no-test-modification review scope.
- User focus: no additional user-provided review focus was supplied.
Subagent convergence: Round 1 completed. The normal full-review subagent and the R1 risk-focused subagent both returned NO_NEW_VALUABLE_FINDINGS; the main-agent risk item was dismissed with code evidence, and no unresolved candidates remain.
|
PR approved by anyone and no changes requested. |
) 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.
…lect compaction profile BE by tablet replica apache#62178 apache#65552 Backport two upstream regression-test fixes that never reached branch-4.0. Both cause recurring failures in the daily branch-4.0 P0 pipeline. 1. ann_index_basic vs ivf_index_test table-name collision (apache#62178) ann_index_basic and ivf_index_test run in the same regression database (ann_index_p0) and both used tbl_ann_l2 / tbl_ann_ip. With suiteParallel=10 they can run concurrently: FE logs of the failing run show ivf_index_test dropping and recreating tbl_ann_ip 230ms after ann_index_basic created it, then inserting 6 rows. ann_index_basic then reads the neighbor's table by name and fails. This also explains the historical intermittent empty result of sql_ip_asc (query landing between the neighbor's create and publish); the insert itself publishes in ~80ms, so the visibility-window theory behind the waitRowsVisible gate (apache#65942) was wrong, and the 30s gate now times out against the neighbor's 6-row table instead. Rename the shared tables with basic_/ivf_ prefixes as upstream did in 9c226f5 (apache#62178) and drop the gate. ann_index_basic.groovy becomes byte-identical to the upstream post-fix file. ivf_index_test takes only the renames because the upstream file also carries the apache#60358 behavior change (insufficient train rows no longer throws) which branch-4.0 BE does not have. No .out changes needed. 2. test_compaction_profile_action queries an arbitrary BE (apache#65552) The suite built the /api/compaction/profile URL from backendId_to_backendIP.keySet()[0]. On a multi-BE pipeline (4 BEs, replication forced to 3) the chosen BE has ~1/4 chance of not hosting the tablet replica, so the tablet_id filter returns an empty list (observed 5/26 failures; the case is currently muted as DORIS-26131). Derive the endpoint from the BackendId of the selected tablet row as upstream did in fd16ebd (apache#65552); the file becomes byte-identical to the upstream post-fix version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What problem does this PR solve?
Issue Number: N/A
Related PR: #63886
Problem Summary:
test_compaction_profile_actionqueried/api/compaction/profileon the first backend returned bySHOW 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
BackendIdin the sameSHOW TABLETSrow as the selectedTabletId. The case therefore queries a replica that participates intrigger_and_wait_compactionwhile preserving all existing API assertions.Release note
None
Check List (For Author)
Test
mvn package -DskipTests -Dmaven.javadoc.skip=trueinregression-test/framework.ZipFile.testzip().GroovyShell.parse().Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)