Skip to content

[fix](case) test_partition_instance_query_cache: gate plan-shape checks to single BE#64520

Open
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-test-partition-instance-query-cache-single-be
Open

[fix](case) test_partition_instance_query_cache: gate plan-shape checks to single BE#64520
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-test-partition-instance-query-cache-single-be

Conversation

@shuke987

Copy link
Copy Markdown
Collaborator

Problem

test_partition_instance_query_cache is flaky/failing on the branch-4.1 P0 regression. It asserts the query-cache partition-parallelism plan shape: scanInstanceCount == partitionCount and that all of a partition's tablets land in one scan instance. That shape only holds when the scan runs on a single BE.

On a multi-BE cluster the optimization (UnassignedScanSingleOlapTableJob) legitimately produces one instance per (partition, BE) — or, when totalTablets <= parallelExecInstanceNum * numBE, falls back to default per-tablet parallelization. So on the multi-BE P0 cluster the case fails for the wrong reason (verified: partitions=3/3 but scanInstanceCount=24).

Fix

Gate the single-BE-only plan-shape assertions on a single-BE topology (show backends). The result-correctness and cache-consistency checks above still run on any topology. Multi-BE behavior should be covered by a dedicated test.

Verification

Verified on a branch-4.1 cluster: on the multi-BE topology the gated branch is skipped and the suite passes; the data/cache assertions still execute.

🤖 Generated with Claude Code

…ks to single BE

The query-cache "partition parallelism" plan shape this case asserts
(scanInstanceCount == partitionCount, and all of a partition's tablets in one scan
instance) only holds when the scan runs on a single BE. On a multi-BE cluster the
optimization (UnassignedScanSingleOlapTableJob) legitimately produces one instance per
(partition, BE), or -- when totalTablets <= parallelExecInstanceNum * numBE -- falls
back to default per-tablet parallelization. So on the P0 multi-BE cluster the case fails
for the wrong reason. Gate the single-BE-only plan-shape assertions on a single-BE
topology; the result-correctness and cache-consistency checks above still run on any
topology. Multi-BE behavior should be covered by a dedicated test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shuke987 shuke987 requested a review from yiguolei as a code owner June 15, 2026 08:05
@shuke987

Copy link
Copy Markdown
Collaborator Author

run buildall

@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?

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