-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ttl: fix the timezone issue and panic in the caller of getSession
#58166
Conversation
7390ce4
to
6b96e28
Compare
Signed-off-by: Yang Keao <[email protected]>
6b96e28
to
60f398a
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, lcwangchao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58166 +/- ##
================================================
+ Coverage 73.1496% 73.5913% +0.4417%
================================================
Files 1675 1675
Lines 461848 463644 +1796
================================================
+ Hits 337840 341202 +3362
+ Misses 103258 101654 -1604
- Partials 20750 20788 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@YangKeao: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #58107, close #58109
It fixes two issues:
getSession()
may panic, because thegetSession()
may returnnil, nil
.now
inrescheduleJobs
is incorrect.What changed and how does it work?
nowInGlobalTZ
inrescheduleJobs
. It's introduced in https://github.com/pingcap/tidb/pull/51863/files#diff-9053b8d1ea0965da6e623343fd8fa0706cf9fc01a327e70a00aa7d7ae376177eR568, but I don't know why. It seems that thetimeutil.WithinDayTimePeriod
will set location toUTC
instantly.err =
toerr :=
ingetSession()
Check List
Tests
Release note