Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

log_restore: refactor write and ingest logic. (#645) #729

Open
wants to merge 12 commits into
base: release-4.0
Choose a base branch
from

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Jan 31, 2021

cherry-pick #645 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In br repo:
git pr https://github.com/pingcap/br/pull/729

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/br.git pr/729:release-4.0-d87292ca02cb

What problem does this PR solve?

Both Lightning and BR have a similar logic. write and ingest kv as well as retry policy. This abstract Ingest method for BR and Lightning easy to use.

What is changed and how it works?

  1. Refactor write and ingest code from log_client to Ingestser.

Check List

Tests

  • No code

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • No release note.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@kennytm
Copy link
Collaborator

kennytm commented Feb 4, 2021

/lgtm

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Feb 4, 2021
@3pointer
Copy link
Collaborator

3pointer commented Mar 3, 2021

/rebuild

Comment on lines 19 to 20
[cdc]
hibernate-regions-compatible=false
Copy link
Member

Choose a reason for hiding this comment

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

Wrong config for release-4.0

@glorv
Copy link
Collaborator

glorv commented Mar 10, 2021

/run-all-tests

@@ -103,6 +103,7 @@ run_sql "DROP DATABASE ${DB}_DDL1"
run_sql "DROP DATABASE ${DB}_DDL2"

# restore full
export GO_FAILPOINTS='github.com/pingcap/tidb-lightning/lightning/backend/local/FailIngestMeta=return("notleader")'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export GO_FAILPOINTS='github.com/pingcap/tidb-lightning/lightning/backend/local/FailIngestMeta=return("notleader")'
export GO_FAILPOINTS='github.com/pingcap/br/pkg/lightning/backend/FailIngestMeta=return("notleader")'

@@ -126,6 +127,7 @@ if [ "$row_count" -ne "0" ]; then
echo "TEST: [$TEST_NAME] fail on ts range test."
fi

export GO_FAILPOINTS='github.com/pingcap/tidb-lightning/lightning/backend/local/FailIngestMeta=return("epochnotmatch")'
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

@ti-chi-bot
Copy link
Member

@ti-srebot: PR needs rebase.

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.

@glorv
Copy link
Collaborator

glorv commented Jul 21, 2021

@3pointer Do we still need to cherry-pick this PR to release-4.0?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants