Skip to content

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

Open
shuke987 wants to merge 1 commit into
apache:masterfrom
shuke987:fix-master-tz-load-restore
Open

[fix](regression) Restore time zone after test_tz_load#65412
shuke987 wants to merge 1 commit into
apache:masterfrom
shuke987:fix-master-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

  • master 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/master
  • 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 master-specific regression environment
  • Buildall skipped

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

Static review completed for PR #65412.

I found no blocking issue and am leaving this as a comment-only review. The patch is narrowly scoped to regression-suite isolation in test_tz_load: it captures @@global.time_zone, restores it in finally, and removes the temporary global_timezone_test table without changing the query assertions or expected output.

Critical checkpoint conclusions:

  • Goal and proof: the change addresses the leaked global time_zone from this nonConcurrent suite; the existing ordered qt_global_offset checks and expected output remain unchanged.
  • Scope: one regression test file, small and focused.
  • Concurrency/lifecycle: no production concurrency is involved; the relevant lifecycle is global/session test state, and SET GLOBAL is restored in finally.
  • Config/session propagation: Doris VariableMgr.setVarInternal applies SET GLOBAL to both global default state and the current session, so restoring the saved global value covers the state this suite mutates.
  • Compatibility and parallel paths: no storage format, FE/BE protocol, or production behavior changes; explicit timezone and default/global timezone load paths remain covered.
  • Test result correctness: no .out update is needed because the result-producing SQL is unchanged and ordered.
  • Data writes, transactions, persistence, observability, and performance: not applicable to this regression-only cleanup.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite, semantic-equivalence, join, or aggregate-path candidate; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
  • tests-session-config: no regression-output, session/config, compatibility, or basic style candidate; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.

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

Validation notes: I used GitHub PR metadata/patch as the authoritative scope because this runner is a grafted checkout and is missing the base SHA, .worktree_initialized, and thirdparty/installed. Existing inline comments were empty. The GitHub patch reverse-check passed with git apply -R --check --whitespace=error. I did not run the regression test or a build locally in this environment.

@shuke987

Copy link
Copy Markdown
Collaborator Author

/run buildall

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