Skip to content

Conversation

lcwangchao
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #51768

What changed and how does it work?

  • fix the timer store's watermark drift for DST
  • refine the behavior for the timer store with time zone. For time fields in TimerRecord, their location should be same with the TimerRecord.Location field

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Mar 14, 2024
@lcwangchao lcwangchao requested a review from bb7133 March 14, 2024 09:04
@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 14, 2024
@lcwangchao lcwangchao requested a review from YangKeao March 14, 2024 09:04
Copy link

tiprow bot commented Mar 14, 2024

Hi @lcwangchao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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/test-infra repository.

@@ -148,12 +148,27 @@ func (s *tableTimerStoreCore) List(ctx context.Context, cond api.Cond) ([]*api.T
timerData = row.GetBytes(3)
}

tz := row.GetString(4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a separated tzParse, rather than use tz directly here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because tz will be assigned to TimerSpec.TimeZone but tzParse is used to parse the real location.

For example, if user created a timer with time zone "" (an empty string, means to use database timezone). The returned TimerSpec.TimeZone should also be an empty, but we should use a valid time zone string to parse it to time.Location

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Merging #51783 (fa945e8) into master (d6de964) will increase coverage by 2.1012%.
Report is 16 commits behind head on master.
The diff coverage is 76.1904%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51783        +/-   ##
================================================
+ Coverage   70.7253%   72.8265%   +2.1012%     
================================================
  Files          1476       1476                
  Lines        437498     438609      +1111     
================================================
+ Hits         309422     319424     +10002     
+ Misses       108689      99147      -9542     
- Partials      19387      20038       +651     
Flag Coverage Δ
integration 48.7915% <12.6984%> (?)
unit 70.5113% <76.1904%> (-0.0297%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.4391% <ø> (+5.5214%) ⬆️

Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 14, 2024
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Mar 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 15, 2024
Copy link

ti-chi-bot bot commented Mar 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-14 14:36:36.039878665 +0000 UTC m=+955423.062125047: ☑️ agreed by YangKeao.
  • 2024-03-15 04:03:25.923251724 +0000 UTC m=+1003832.945498111: ☑️ agreed by bb7133.

@ti-chi-bot ti-chi-bot bot merged commit d708569 into pingcap:master Mar 15, 2024
@lcwangchao lcwangchao deleted the timer_store_tz branch March 15, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The time drifts in timer store in daylight saving time
3 participants