forked from pingcap/tiflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "puller(ticdc): always split update kv entries in sink safe mo…
…de (pingcap#11224) (pingcap#11656)" This reverts commit 1722e6f.
- Loading branch information
1 parent
9e81972
commit 6009493
Showing
4 changed files
with
28 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ import ( | |
"github.com/pingcap/tiflow/cdc/entry/schema" | ||
"github.com/pingcap/tiflow/cdc/model" | ||
"github.com/pingcap/tiflow/cdc/processor/sinkmanager" | ||
"github.com/pingcap/tiflow/cdc/processor/sourcemanager" | ||
"github.com/pingcap/tiflow/cdc/processor/tablepb" | ||
"github.com/pingcap/tiflow/cdc/redo" | ||
"github.com/pingcap/tiflow/cdc/scheduler" | ||
|
@@ -42,7 +41,6 @@ import ( | |
redoPkg "github.com/pingcap/tiflow/pkg/redo" | ||
"github.com/pingcap/tiflow/pkg/spanz" | ||
"github.com/pingcap/tiflow/pkg/upstream" | ||
"github.com/pingcap/tiflow/pkg/util" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
|
@@ -793,73 +791,3 @@ func TestProcessorNotInitialized(t *testing.T) { | |
p, _, _ := initProcessor4Test(cdcContext.NewContext4Test(context.Background(), true), t, &liveness, false) | ||
require.Nil(t, p.WriteDebugInfo(os.Stdout)) | ||
} | ||
|
||
func TestGetPullerSplitUpdateMode(t *testing.T) { | ||
testCases := []struct { | ||
sinkURI string | ||
config *config.ReplicaConfig | ||
mode sourcemanager.PullerSplitUpdateMode | ||
}{ | ||
{ | ||
sinkURI: "kafka://127.0.0.1:9092/ticdc-test2", | ||
config: nil, | ||
mode: sourcemanager.PullerSplitUpdateModeNone, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/", | ||
config: nil, | ||
mode: sourcemanager.PullerSplitUpdateModeAtStart, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/?safe-mode=true", | ||
config: nil, | ||
mode: sourcemanager.PullerSplitUpdateModeAlways, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/?safe-mode=false", | ||
config: nil, | ||
mode: sourcemanager.PullerSplitUpdateModeAtStart, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/", | ||
config: &config.ReplicaConfig{ | ||
Sink: &config.SinkConfig{ | ||
SafeMode: util.AddressOf(true), | ||
}, | ||
}, | ||
mode: sourcemanager.PullerSplitUpdateModeAlways, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/", | ||
config: &config.ReplicaConfig{ | ||
Sink: &config.SinkConfig{ | ||
SafeMode: util.AddressOf(false), | ||
}, | ||
}, | ||
mode: sourcemanager.PullerSplitUpdateModeAtStart, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/?safe-mode=true", | ||
config: &config.ReplicaConfig{ | ||
Sink: &config.SinkConfig{ | ||
SafeMode: util.AddressOf(false), | ||
}, | ||
}, | ||
mode: sourcemanager.PullerSplitUpdateModeAlways, | ||
}, | ||
{ | ||
sinkURI: "mysql://root:[email protected]:3306/?safe-mode=false", | ||
config: &config.ReplicaConfig{ | ||
Sink: &config.SinkConfig{ | ||
SafeMode: util.AddressOf(true), | ||
}, | ||
}, | ||
mode: sourcemanager.PullerSplitUpdateModeAlways, | ||
}, | ||
} | ||
for _, tc := range testCases { | ||
mode, err := getPullerSplitUpdateMode(tc.sinkURI, tc.config) | ||
require.Nil(t, err) | ||
require.Equal(t, tc.mode, mode) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters