-
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)
#58709
ttl: fix the timezone issue and panic in the caller of getSession
(#58166)
#58709
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
/retest |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-8.5 #58709 +/- ##
================================================
Coverage ? 57.0199%
================================================
Files ? 1770
Lines ? 627244
Branches ? 0
================================================
Hits ? 357654
Misses ? 245423
Partials ? 24167
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[LGTM Timeline notifier]Timeline:
|
/merge |
@lcwangchao: We have migrated to builtin 👉 Please use
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 ti-community-infra/tichi repository. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lcwangchao, YangKeao 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 |
…58166-to-release-8.5 Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
This is an automated cherry-pick of #58166
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