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

cluster: fix wrong default initial-commit-ts in drainer #1678

Merged
merged 2 commits into from
Dec 20, 2021

Conversation

nexustar
Copy link
Collaborator

@nexustar nexustar commented Dec 16, 2021

What problem does this PR solve?

close #1677 #1680

What is changed and how it works?

Check List

Tests

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

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 16, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 16, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2021

Codecov Report

Merging #1678 (949efc6) into master (60ae371) will decrease coverage by 3.02%.
The diff coverage is n/a.

❗ Current head 949efc6 differs from pull request most recent head 7c91213. Consider uploading reports for the commit 7c91213 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1678      +/-   ##
==========================================
- Coverage   42.83%   39.81%   -3.02%     
==========================================
  Files         298      298              
  Lines       33525    33525              
==========================================
- Hits        14359    13347    -1012     
- Misses      17284    18395    +1111     
+ Partials     1882     1783      -99     
Flag Coverage Δ
cluster 29.23% <ø> (-4.13%) ⬇️
unittest ?

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

Impacted Files Coverage Δ
pkg/cluster/spec/drainer.go 55.28% <ø> (ø)
pkg/cluster/template/config/config.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/cluster/template/scripts/scripts.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/cluster/template/scripts/tiflash.go 0.00% <0.00%> (-77.94%) ⬇️
pkg/cluster/template/systemd/tispark.go 0.00% <0.00%> (-65.71%) ⬇️
pkg/cluster/template/scripts/tispark.go 0.00% <0.00%> (-63.79%) ⬇️
pkg/cluster/template/config/tispark.go 0.00% <0.00%> (-61.29%) ⬇️
pkg/cluster/spec/tispark.go 2.29% <0.00%> (-59.92%) ⬇️
pkg/cluster/spec/tiflash.go 0.89% <0.00%> (-46.33%) ⬇️
pkg/cluster/spec/bindversion.go 54.55% <0.00%> (-36.36%) ⬇️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60ae371...7c91213. Read the comment docs.

@nexustar nexustar force-pushed the fix_wrong_default_commit_ts branch from 44adfcf to 8576194 Compare December 16, 2021 06:21
@srstack
Copy link
Collaborator

srstack commented Dec 16, 2021

/LGTM

@glkappe
Copy link
Contributor

glkappe commented Dec 16, 2021

https://github.com/pingcap/tidb-binlog/blob/53a591e8258a97aefe9f5b705176e4a9d068c59e/arbiter/config.go#L66

In drainer's code, --initial-commit-ts may be of type int?

@nexustar
Copy link
Collaborator Author

https://github.com/pingcap/tidb-binlog/blob/53a591e8258a97aefe9f5b705176e4a9d068c59e/arbiter/config.go#L66

In drainer's code, --initial-commit-ts may be of type int?

Type of DrainerSpec.CommitTS is only used inside tiup-cluster, it is the same after yaml.Marshal()
if it need to be int, we should modify template of run_drainer.sh

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2021
@nexustar nexustar force-pushed the fix_wrong_default_commit_ts branch from 2076150 to 26ac529 Compare December 16, 2021 10:09
@ti-chi-bot ti-chi-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 16, 2021
@nexustar nexustar removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2021
@nexustar nexustar requested review from AstroProfundis and removed request for july2993 and lucklove December 17, 2021 03:24
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 20, 2021
@AstroProfundis AstroProfundis added this to the v1.8.1 milestone Dec 20, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 7c91213

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 20, 2021
@ti-chi-bot ti-chi-bot merged commit f5e5f24 into pingcap:master Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--initial-commit-ts is not assigned the correct default value
6 participants