Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

restore: disable some pd scheduler during restore #408

Merged
merged 9 commits into from
Oct 23, 2020
Merged

Conversation

glorv
Copy link
Contributor

@glorv glorv commented Sep 27, 2020

What problem does this PR solve?

disable pd scheduler for local/importer backend to make split region and ingest sst files more stable

depends on pingcap/br#532 to be merge first

What is changed and how it works?

Check List

Tests

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

Side effects

Related changes

  • Need to update the documentation

@kennytm kennytm added the status/DNM Do not merge, test is failing or blocked by another PR label Sep 27, 2020
@glorv
Copy link
Contributor Author

glorv commented Sep 27, 2020

/run-all-tests tidb=release-3.0 tikv=release-3.0 pd=release-3.0

lightning/restore/restore.go Outdated Show resolved Hide resolved
lightning/restore/restore.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

pingcap/br#532 has been merged. please update the go.mod.

rest LGTM.

@glorv glorv removed the status/DNM Do not merge, test is failing or blocked by another PR label Sep 28, 2020
@kennytm kennytm added the status/LGT1 One reviewer already commented LGTM (LGTM1) label Sep 28, 2020
var wg sync.WaitGroup
// for importer/local backend, we should disable some pd scheduler and change some settings, to
// make split region and ingest sst more stable
if rc.cfg.TikvImporter.Backend != config.BackendTiDB {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about make another config to control the schedulers?

Copy link
Contributor Author

@glorv glorv Sep 28, 2020

Choose a reason for hiding this comment

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

Are there any situations we want to use local/importer backend but still need to enable these schedulers? Since they have big impacts, I think we should always disable them in any case? In cases when we shouldn't disable the schedulers, maybe tidb backend is a proper choice then

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, another problem is when lightning exits abnormally after remove these schedulers. next time lightning will reset nothing even it successfully restore data without any errors. so we should follow this tikv/pd#2782, and better to have a way to set the lost config/schedulers back.

@kennytm
Copy link
Collaborator

kennytm commented Oct 12, 2020

let's block this on pingcap/br#551.

@overvenus
Copy link
Member

Both pingcap/br#532 and pingcap/br#551 are merged, could you move this PR forward?

@glorv glorv added this to the v4.0.8 milestone Oct 19, 2020
@kennytm kennytm requested a review from 3pointer October 21, 2020 04:12
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

@glorv glorv added status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) and removed status/LGT1 One reviewer already commented LGTM (LGTM1) labels Oct 23, 2020
@glorv glorv merged commit 44d81ba into master Oct 23, 2020
@glorv glorv deleted the pd-schedule branch October 23, 2020 02:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants