Skip to content
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

log-backup: remove the timezone from log-date #36369

Merged
merged 13 commits into from
Jul 21, 2022

Conversation

MoCuishle28
Copy link
Contributor

@MoCuishle28 MoCuishle28 commented Jul 20, 2022

What problem does this PR solve?

Issue Number: close #36370

Problem Summary:

What is changed and how it works?

Remove the timezone info from log-date.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Manual Test

  • enter br log status -u {PD-IP}:{PD-Port}
  • enter br log metadata -s 's3://{bucket}/{prefix}'

output:

● Total 1 Tasks.
> #1 <
              name: pitr
            status: ● NORMAL
             start: 2022-07-20 15:43:43.178 +0800
               end: 2090-11-18 22:07:45.624 +0800
           storage: s3://{bucket}/{prefix}
       speed(est.): 0.00 ops/s
checkpoint[global]: 2022-07-20 16:28:18.378 +0800; gap=22s
[2022/07/20 16:33:00.737 +08:00] [INFO] [collector.go:69] ["log metadata"] [log-min-ts=434604259287760897] [log-min-date="2022-07-15 19:14:39.534 +0800"] [log-max-ts=434605479096221697] [log-max-date="2022-07-15 20:32:12.734 +0800"]
[2022/07/20 16:33:00.737 +08:00] [INFO] [collector.go:69] ["log metadata success summary"] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0] [total-take=136.799319ms]

Release note

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

None

Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 20, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Leavrth
  • joccau

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 20, 2022
@joccau
Copy link
Member

joccau commented Jul 20, 2022

/cc @3pointer @YuJuncen @joccau @Leavrth

@sre-bot
Copy link
Contributor

sre-bot commented Jul 20, 2022

Copy link
Member

@joccau joccau 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 added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 20, 2022
@MoCuishle28
Copy link
Contributor Author

/component br

@ti-chi-bot ti-chi-bot added the component/br This issue is related to BR of TiDB. label Jul 20, 2022
@@ -117,9 +117,9 @@ func (p *printByTable) AddTask(task TaskStatus) {
table := p.console.CreateTable()
table.Add("name", task.Info.Name)
table.Add("status", task.colorfulStatusString())
table.Add("start", fmt.Sprint(oracle.GetTimeFromTS(task.Info.StartTs)))
table.Add("start", fmt.Sprint(oracle.GetTimeFromTS(task.Info.StartTs).Format("2006-01-02 15:04:05.999999999 -0700")))
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use a common function and add a unit test case to make sure the output of this common function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. PTAL

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 21, 2022
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 21, 2022
Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

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

LGTM

@3pointer
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c37cfff

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 21, 2022
@3pointer
Copy link
Contributor

/run-check_dev_2

@3pointer
Copy link
Contributor

/run-check_dev_2

@3pointer
Copy link
Contributor

/run-unit-tests

@3pointer
Copy link
Contributor

/run-check_dev_2
/run-unit-test

@MoCuishle28
Copy link
Contributor Author

/run-check_dev_2

@ti-chi-bot ti-chi-bot merged commit 6c704f7 into pingcap:master Jul 21, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Jul 21, 2022

TiDB MergeCI notify

✅ Well Done! New fixed [2] after this pr merged.

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/integration-common-test 🔴 failed 7, success 4, total 11 48 min Existing failure
idc-jenkins-ci-tidb/integration-ddl-test 🔴 failed 4, success 2, total 6 14 min Existing failure
idc-jenkins-ci-tidb/integration-compatibility-test 🔴 failed 1, success 0, total 1 3 min 56 sec Existing failure
idc-jenkins-ci/integration-cdc-test ✅ all 36 tests passed 28 min Fixed
idc-jenkins-ci-tidb/tics-test ✅ all 1 tests passed 6 min 19 sec Fixed
idc-jenkins-ci-tidb/common-test 🟢 all 12 tests passed 19 min Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 6 min 32 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 5 min 41 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 21 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

morgo added a commit to morgo/tidb that referenced this pull request Jul 22, 2022
…ip-init

* upstream/master: (125 commits)
  infoschema: fix PromQL for `tidb_distsql_copr_cache` (pingcap#36450)
  test: stabilize TestTopSQLCPUProfile (pingcap#36468)
  parser: add support of 'ADMIN SHOW DDL JOB QUERIES LIMIT m OFFSET n' transferring to AST (pingcap#36285)
  *: enable flaky test for all test (pingcap#36385)
  expression: fix return type of agg func `bit_or` when handling varbinary column (pingcap#36415)
  executor: fix aggregating enum zero value gets different results from mysql  (pingcap#36208)
  server: skip check tiflash version (pingcap#36451)
  *: Minor update to SECURITY.md to improved clarity (pingcap#36346)
  table partition: add telemetry for partition table (pingcap#36204)
  ddl: invalid multiple MAXVALUE partitions (pingcap#36329) (pingcap#36345)
  planner: Fixed `Merge` hint in nested CTE (pingcap#36432)
  metric: impove concurrency ddl metrics (pingcap#36405)
  planner: add more test cases for leading outer join (pingcap#36409)
  ddl: only set concurrent variable if no error (pingcap#36437)
  ddl: fix update panic in the middle of multi-schema change (pingcap#36421)
  session: Mising OptimizeWithPlanAndThenWarmUp in prepare-execute path (pingcap#36347)
  executor,metrics: add a metric for observing execution phases (pingcap#35906)
  br: unified docker image align with tidb (pingcap#36016)
  ddl: skip to close nil sessPool  (pingcap#36425)
  log-backup: remove the timezone from log-date (pingcap#36369)
  ...
morgo added a commit to morgo/tidb that referenced this pull request Jul 22, 2022
* upstream/master: (280 commits)
  infoschema: fix PromQL for `tidb_distsql_copr_cache` (pingcap#36450)
  test: stabilize TestTopSQLCPUProfile (pingcap#36468)
  parser: add support of 'ADMIN SHOW DDL JOB QUERIES LIMIT m OFFSET n' transferring to AST (pingcap#36285)
  *: enable flaky test for all test (pingcap#36385)
  expression: fix return type of agg func `bit_or` when handling varbinary column (pingcap#36415)
  executor: fix aggregating enum zero value gets different results from mysql  (pingcap#36208)
  server: skip check tiflash version (pingcap#36451)
  *: Minor update to SECURITY.md to improved clarity (pingcap#36346)
  table partition: add telemetry for partition table (pingcap#36204)
  ddl: invalid multiple MAXVALUE partitions (pingcap#36329) (pingcap#36345)
  planner: Fixed `Merge` hint in nested CTE (pingcap#36432)
  metric: impove concurrency ddl metrics (pingcap#36405)
  planner: add more test cases for leading outer join (pingcap#36409)
  ddl: only set concurrent variable if no error (pingcap#36437)
  ddl: fix update panic in the middle of multi-schema change (pingcap#36421)
  session: Mising OptimizeWithPlanAndThenWarmUp in prepare-execute path (pingcap#36347)
  executor,metrics: add a metric for observing execution phases (pingcap#35906)
  br: unified docker image align with tidb (pingcap#36016)
  ddl: skip to close nil sessPool  (pingcap#36425)
  log-backup: remove the timezone from log-date (pingcap#36369)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

br restore point failed with restored-ts "2022-07-16 20:30:09.068 +0800 CST" which is from log metadata output
6 participants