Skip to content

[fix](regression) Sync version 3 before DROP in test_clean_tablet_when_drop_force_table - #69846

Merged
liaoxin01 merged 1 commit into
apache:masterfrom
liaoxin01:fix-drop-force-table-cache-case
Oct 31, 2026
Merged

liaoxin01 merged 1 commit into
apache:masterfrom
liaoxin01:fix-drop-force-table-cache-case

Conversation

@liaoxin01

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: #68449

Problem Summary:

test_clean_tablet_when_drop_force_table fails intermittently with File cache directories were not cleaned before timeout. The leftover cache dirs all belong to the version 3 rowsets.

#68449 set disable_auto_compaction=true for this case. Before that change, cloud compaction called sync_rowsets() and loaded version 3 into the BE tablets as a side effect. Now nothing loads version 3 between the second stream load and DROP TABLE FORCE, because the case only queries after the version 2 load. The cloud drop_tablet_callback only recycles the file cache of rowsets in get_snapshot_rowset(true), so the version 3 cache stays and the cleanup assertion times out.

This PR queries the table after the version 3 load, the same way the case already does after version 2. The query loads version 3 on every BE before DROP. It also asserts the row count (160000) to confirm version 3 is visible.

Release note

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

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

…n_drop_force_table

The case disables auto compaction, so version 3 is never synced into the
BE tablets before DROP TABLE FORCE. drop_tablet_callback only recycles the
file cache of rowsets in the BE tablet snapshot, so the version 3 cache
dirs are left behind and the cleanup assertion times out.

Query the table after the version 3 load so the BE loads that rowset,
the same way the case already does for version 2.
@liaoxin01
liaoxin01 force-pushed the fix-drop-force-table-cache-case branch from cfb4b0c to 4426a4a Compare October 29, 2026 12:53
@liaoxin01

Copy link
Copy Markdown
Contributor Author

/review

@liaoxin01

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR 69846 at exact head 4426a4a against the supplied merge-base diff. The only change adds five post-load COUNT(*) reads and checks 160000 rows before collecting version-3 cache paths. The two stream loads each require 80000 successful, unfiltered rows; the regression SQL path returns a numeric aggregate; and the cloud OLAP scan synchronizes every tablet range to query version 3. With auto compaction disabled, the added reads establish the cache baseline required by the subsequent DROP cleanup assertions.

Critical checkpoints: the change is small and focused; it introduces no new production concurrency, locking, lifecycle, configuration, protocol, persistence, or memory-management path; the repeated warmup is bounded and the two test cases run sequentially; and the deterministic scalar assertion is appropriate for this procedural regression test. The changed-file diff passes whitespace validation. No additional user review focus was supplied. Existing inline review threads and blocking findings are absent.

This was a static review as required by the contract; no build or regression execution was performed. An externally enabled multi-replica routing override is outside this suite's declared configuration and was recorded as an environment boundary, not a defect. No verified inline findings remain, so the review converged in round 1.

Review converged after 1 round(s).

@liaoxin01
liaoxin01 merged commit ba3f2c6 into apache:master Oct 31, 2026
37 checks passed
@liaoxin01
liaoxin01 deleted the fix-drop-force-table-cache-case branch October 31, 2026 07:48
github-actions Bot pushed a commit that referenced this pull request Oct 31, 2026
…n_drop_force_table (#69846)

Related PR: #68449

Problem Summary:

`test_clean_tablet_when_drop_force_table` fails intermittently with
`File cache directories were not cleaned before timeout`. The leftover
cache dirs all belong to the version 3 rowsets.

#68449 set `disable_auto_compaction=true` for this case. Before that
change, cloud compaction called `sync_rowsets()` and loaded version 3
into the BE tablets as a side effect. Now nothing loads version 3
between the second stream load and `DROP TABLE FORCE`, because the case
only queries after the version 2 load. The cloud `drop_tablet_callback`
only recycles the file cache of rowsets in `get_snapshot_rowset(true)`,
so the version 3 cache stays and the cleanup assertion times out.

This PR queries the table after the version 3 load, the same way the
case already does after version 2. The query loads version 3 on every BE
before DROP. It also asserts the row count (160000) to confirm version 3
is visible.
yiguolei pushed a commit that referenced this pull request Nov 2, 2026
…n_tablet_when_drop_force_table #69846 (#69910)

Cherry-picked from #69846

Co-authored-by: Xin Liao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants