Skip to content

[fix](regression) Wait for auto partition recycle#65375

Open
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-branch41-auto-new-recycle-wait
Open

[fix](regression) Wait for auto partition recycle#65375
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-branch41-auto-new-recycle-wait

Conversation

@shuke987

@shuke987 shuke987 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix test_auto_new_recycle to wait for auto partition recycle by polling the expected partition count.
  • Replace fixed sleeps before retention-count assertions with an Awaitility-based helper.
  • Keep the original validation intent: auto partition retention should eventually keep only the latest configured historical partitions.

Testing

  • git diff --check
  • git diff --cached --check
  • Not run locally: no regression environment was allocated for this case.

Failure evidence:

  • x64 branch-4.1 NonConcurrent build 201293, occurrence 2000000189.
  • Recent same-pipeline history showed repeated line-129 failures mixed with passes, which points to async scheduler timing rather than a deterministic product semantic failure.

@shuke987 shuke987 requested a review from yiguolei as a code owner July 8, 2026 09:36
@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

shuke987 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

@shuke987

shuke987 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 10th, 2026 6:44 AM.
Workflow run: https://github.com/apache/doris/actions/runs/28932798326

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@shuke987

shuke987 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/review

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

Automated review completed for PR #65375.

Critical checkpoints:

  • Scope verified from GitHub metadata and patch: one modified file, regression-test/suites/partition_p0/auto_partition/test_auto_new_recycle.groovy, at head 0e74c0a68d3255acb2af8336246db9207881a8d8.
  • Existing inline review context was empty, so no duplicate inline issue was suppressed.
  • The repo-local .claude/skills/code-review/SKILL.md was not present in this checkout after hidden-path checks; I followed the review prompt and shared-ledger workflow.
  • Patch-scoped git diff --check against the fetched base passed. I did not run the regression suite because this runner does not provide the required Doris regression environment.

Result: requesting changes for one test stability regression introduced by the longer Awaitility polling window.

User focus: no additional user-provided review focus was supplied.

Subagent conclusions: optimizer-rewrite found no optimizer/rewrite issue. tests-session-config proposed TSC-001; I verified and accepted it as MAIN-001. Convergence round C1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same final ledger/comment set.


waitUntilSafeExecutionTime("NOT_CROSS_DAY_BOUNDARY", 20)

def waitPartitionCount = { int expectedCount ->

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.

The longer poll makes this final now()-based case much easier to race with midnight. The only guard is still waitUntilSafeExecutionTime("NOT_CROSS_DAY_BOUNDARY", 20), but this helper can now wait up to 1200 seconds, and this final call replaces a fixed 8-second sleep after inserting date_add(now(), interval number-5 day). The recycle code decides whether a partition is historical using the scheduler's current time, so if the rows are inserted shortly before midnight and this await observes the recycle after midnight, the partition for the insert day becomes historical and retention can leave 5 partitions instead of the asserted 6. Please either make this case use a fixed base date/time or move/resize the day-boundary guard so it covers the maximum wait through this final assertion.

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