Skip to content

[fix](regression) Restore time zone after test_tz_load#65411

Open
shuke987 wants to merge 1 commit into
apache:branch-4.0from
shuke987:fix-branch40-tz-load-restore
Open

[fix](regression) Restore time zone after test_tz_load#65411
shuke987 wants to merge 1 commit into
apache:branch-4.0from
shuke987:fix-branch40-tz-load-restore

Conversation

@shuke987

@shuke987 shuke987 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • restore the original global time_zone after test_tz_load changes it during the suite
  • clean up the temporary global_timezone_test table in the finally block
  • prevent later nonConcurrent suites from inheriting UTC global time zone

Evidence

  • branch-4.0 has the same test_tz_load pattern: it sets GLOBAL time_zone to UTC and previously did not restore it before suite exit
  • test_json_load contains a timezone-sensitive from_unixtime assertion that can be affected by the leaked global time zone
  • same branch-4.1 fix was submitted in [fix](regression) Restore time zone after test_tz_load #65385

Testing

  • git diff --check HEAD~1..HEAD
  • Cherry-picked the branch-4.1 fix cleanly onto latest origin/branch-4.0
  • Equivalent fix was validated on 172.20.56.184 by running test_tz_load and then test_json_load with Asia/Shanghai restored after the runs
  • Not run on a branch-4.0-specific regression environment
  • Buildall skipped

@shuke987 shuke987 requested a review from morningman as a code owner July 9, 2026 08:19
@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 changed the title [branch-4.0](regression) Restore time zone after test_tz_load [fix](regression) Restore time zone after test_tz_load Jul 9, 2026
@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.

Reviewed PR 65411. I did not find a correctness issue that needs an inline review comment.

Critical checkpoints:

  • Scope: GitHub PR metadata shows one changed file, regression-test/suites/datatype_p0/datetimev2/test_tz_load.groovy, at head 2f6d0195a828b5f2ef39708f7948a8bff90b24ae.
  • Existing review context: no existing inline review comments or replies were present.
  • Time zone restore: the suite now captures @@global.time_zone, runs the existing load assertions inside try, and restores the captured global value in finally; the Doris SET path validates normal timezone names/offsets/UTC values, and the final table cleanup is tolerant through try_sql.
  • Regression expectations: the test body and test_tz_load.out assertions are otherwise unchanged and still match the three load cases.
  • User focus: no additional user-provided review focus was supplied.
  • Validation: after fetching the exact base commit, git diff --check passed for the reviewed base/head file range. I did not run the branch-4.0 regression suite in this runner, so runtime validation remains PR-author reported plus static review here.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite candidate; no inline comment.
  • tests-session-config: no tests/session/config candidate; no inline comment.

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