Skip to content

branch-4.1: [test](ann) move ann index-only-scan to deterministic debug-point tests (backport subset of #64525) - #64603

Merged
yiguolei merged 3 commits into
apache:branch-4.1from
shuke987:pick-ann-rework-64525
Jun 17, 2026
Merged

branch-4.1: [test](ann) move ann index-only-scan to deterministic debug-point tests (backport subset of #64525)#64603
yiguolei merged 3 commits into
apache:branch-4.1from
shuke987:pick-ann-rework-64525

Conversation

@shuke987

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Back-ports the ANN index-only-scan test rework from branch-4.0 #64525 to
branch-4.1. On 4.1 Cloud-P0 the two ann cases are muted-but-flaky because they
assert on profile scan-bytes equality, which is non-deterministic.

This rework (matching 4.0) removes the flaky Cloud-P0 cases
(ann_index_only_scan, ann_index_only_scan_distance_expr,
ann_index_only_scan_metric_direction + its .out) and replaces the coverage
with deterministic nonConcurrent debug-point tests that force the
index-only path via GetDebugPoint().enableDebugPointForAllBEs("segment_iterator._read_columns_by_index", ...).

Verified the debug point segment_iterator._read_columns_by_index already
exists on branch-4.1 (be/src/storage/segment/segment_iterator.cpp), and the
ANN range-search product fix (#63965) is already on 4.1, so the new tests are
runnable here. Test-only change (no FE/BE code).

Complements #64597 (the other Cloud-P0 deflake backports).

Cherry-picked from branch-4.0 #64525 (with -x provenance)

  • [test](regression) Add debug point ANN index-only scan test (#63859)
  • [fix](test) drop unsupported enable_condition_cache var in ann_index_only_scan debug_point cases
  • [fix](test) drop unsupported enable_condition_cache var in ann_range_search cases

Not included (separate follow-up)

  • [fix](compaction) let time_series_level2_file_count debug point bypass … — touches BE
    (cumulative_compaction_time_series_policy.cpp, which moved to be/src/storage/compaction/
    on 4.1 due to the BE dir refactor pick refactor BE directory structure to 4.1 #61595), so it needs a manual port + a remote compile
    verification before submitting; handled separately.

Release note

None

🤖 Generated with Claude Code

zhiqiang-hhhh and others added 3 commits June 17, 2026 14:13
…3859)

Issue Number: None

Related PR: None

Problem Summary: The previous ANN index-only scan regression coverage
inferred whether source vector columns were skipped by comparing
ScanBytes from query profiles. That made the test hard to review and
could miss cases where both query shapes still read the source column.
Replace that coverage with a dedicated debug-point regression that
directly fails if the embedding column is read in index-only scenarios,
including a remapped reader-schema case where the source slot index
differs from the storage column id. Remove the old profile-based suites
and generated output.

None

- Test: Manual test
    - git diff --cached --check
- Regression test not run per request; an earlier attempt was blocked by
Maven writing to /Users/roanhe/.m2/repository under the sandbox
- Behavior changed: No
- Does this need documentation: No

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

None

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

(cherry picked from commit 6e5198b)
(cherry picked from commit f940eaf)
…only_scan debug_point cases

These 3 cases were cherry-picked from master (apache#63859). The session
variable enable_condition_cache (condition cache feature) does not exist
on branch-4.0, so 'set enable_condition_cache=false' fails with
'Unknown system variable'. Since the feature is absent, the branch is
already in the cache-disabled state the test expects, so removing the
line is a semantic no-op and restores the cases on this branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit d58d717)
…search cases

The session variable enable_condition_cache does not exist on branch-4.0, so 'set enable_condition_cache=false' fails with 'Unknown system variable' and aborts both suites. These two cases were cherry-picked from master (apache#63666, 0675e24), a separate pick from the earlier apache#63859 ann_index_only_scan cases whose line was already removed in d58d717; this later pick still carried the line. Since the feature is absent, branch-4.0 is already in the cache-disabled state the test expects, so removing the line is a semantic no-op.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit fbfd8fb)
@shuke987
shuke987 requested a review from yiguolei as a code owner June 17, 2026 06:14
@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?

@shuke987

Copy link
Copy Markdown
Contributor Author

run buildall

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@yiguolei
yiguolei merged commit abe2a98 into apache:branch-4.1 Jun 17, 2026
32 of 34 checks passed
yiguolei pushed a commit that referenced this pull request Jun 18, 2026
…/External flaky cases (test-only backport rest of #64525) (#64613)

## What problem does this PR solve?

Back-ports the **remaining test-only** subset of branch-4.0 #64525 to
branch-4.1,
covering the cases still flaky/red across branch-4.1 **Cloud-P0 / P0 /
NonConcurrent /
External** pipelines (the first three subsets are #64597, #64603,
#64607). All changes
are under `regression-test/` — **no FE/BE code, no compile impact**.

Cases addressed (and where they fail today on branch-4.1):
- **query64** (`shape_check.tpcds_sf100/sf1000 .../query64`) — currently
an **un-muted P0 red**; #64525 `ignore`s it.
- **test_colocate_join_of_column_order** — muted on Cloud-P0.
- **test_audit_log_behavior** — muted on NonConcurrent (query_id width).
- **test_routine_load_adaptive_param** + `RoutineLoadTestUtils` — muted
on NonConcurrent/P0 (timeout convergence / drive-data deflakes).
- **parse_sql_from_sql_cache** (drop racy cross-FE assertNoCache),
**test_sql_block_rule_status** (single-FE read) — muted on P0.
- **test_file_cache_statistics** (sum across cache paths),
**test_hive_ctas_to_doris** — muted on External.
- **test_variant_compaction_with_sparse_limit** (pin
`default_variant_max_subcolumns_count` so the session-var fuzzer can't
shrink it), **check_before_quit** (pin variant session defaults) —
variant deflakes.
- **partition_curd_union_rewrite** (guard mv-chosen with
partition-stats-ready), **test_f_delete_publish_skip_read** (wait for
delete visibility), backup/restore `restore_reset_index_id`
serialization.

## Deliberately NOT included
- `[fix](compaction) time_series_level2_file_count debug point` —
touches BE (`cumulative_compaction_time_series_policy.cpp`), needs a
manual port (`olap`→`storage` on 4.1) + remote compile; separate PR.
- `[fix](test) deflake AutoProfileTest` — an FE UT
(`fe/fe-core/src/test/.../AutoProfileTest.java`), separate FE-UT
pipeline; out of scope for this regression-test PR.
- `skip test_parquet_join_runtime_filter` — its stated reason is
**4.0-specific** ("4.0 does not support this feature"); the feature
exists on 4.1 and the test passes there, so skipping it on 4.1 would be
wrong.

## Release note
None

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: morningman <yunyou@selectdb.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

5 participants