-
Notifications
You must be signed in to change notification settings - Fork 102
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
15848b2
to
9657cef
Compare
commit 1ed2b5b Author: Little-Wallace <bupt2013211450@gmail.com> Date: Wed Jul 14 12:11:19 2021 +0800 fix kvproto Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit 3187304 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Tue Jun 8 16:27:42 2021 +0800 update getValues to public Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit b8a36b4 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Tue Jun 8 16:12:25 2021 +0800 refactor duplicate index Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit bab4072 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Mon May 31 17:58:40 2021 +0800 fix fmt Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit 2dfebb0 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Mon May 31 17:30:40 2021 +0800 use io.EOF to judge end Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit b9b6a31 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Thu May 27 17:08:25 2021 +0800 add some node Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit 34b2150 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Tue May 25 20:37:12 2021 +0800 duplicate data before checksum Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit 4341adc Author: Little-Wallace <bupt2013211450@gmail.com> Date: Tue May 25 17:44:38 2021 +0800 support decode kv Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit 18edf13 Author: Little-Wallace <bupt2013211450@gmail.com> Date: Mon May 24 23:58:33 2021 +0800 retry region error Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> commit bdd64be Author: Little-Wallace <bupt2013211450@gmail.com> Date: Mon May 24 20:02:40 2021 +0800 add duplicate manager Signed-off-by: Little-Wallace <bupt2013211450@gmail.com> Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
tests: add test for cross engine duplicate detection
785b622
to
dd6c16a
Compare
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
pattern = '(?i)^(?:[^/]*/)*([^/.]+)\.(.*?)\.0\.sql$' | ||
schema = '$1' | ||
table = '$2' | ||
key = '0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional)
perhaps easier just use two distinct data-source-dir
with no-schema = true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand...
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
pkg/lightning/backend/local/local.go
Outdated
|
||
"github.com/pingcap/parser/mysql" | ||
|
||
"github.com/cockroachdb/pebble" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"github.com/pingcap/parser/mysql" | |
"github.com/cockroachdb/pebble" | |
"github.com/pingcap/parser/mysql" | |
"github.com/cockroachdb/pebble" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Little-Wallace still not fixed 🤔
pkg/lightning/backend/local/local.go
Outdated
return errors.Annotate(err, "collect local duplicate keys failed") | ||
} | ||
if err = duplicateManager.CollectDuplicateRowsFromTiKV(ctx, tbl); err != nil { | ||
return errors.Annotate(err, "duplicate table failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return errors.Annotate(err, "duplicate table failed") | |
return errors.Annotate(err, "collect remote duplicate keys failed") |
|
||
"golang.org/x/sync/errgroup" | ||
|
||
split "github.com/pingcap/br/pkg/restore" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go to the import group with prefix github.com/pingcap/br/*
and why rename it to split
🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copy it from another place.....
"github.com/cockroachdb/pebble" | ||
"github.com/pingcap/errors" | ||
sst "github.com/pingcap/kvproto/pkg/import_sstpb" | ||
kvrpc "github.com/pingcap/kvproto/pkg/kvrpcpb" | ||
tikv "github.com/pingcap/kvproto/pkg/tikvpb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should join all other third-party imports (the group shared by zap, grpc, tidb, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no other issues from me.
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: fb64eaa
|
What problem does this PR solve?
part of #1110
When there are multiple lightning instance importing data to TiKV together, the data of them may be duplicate.
What is changed and how it works?
We use different commit timestamps to distinguish the data imported by different lightning ( see details in #1101) . After import jobs all end, we will scan all data of TiKV to collect duplicate data.
Check List
Tests
Code changes
Side effects
Related changes
Release note