-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-6.5' into cherry-pick-7981-to-release-6.5
- Loading branch information
Showing
106 changed files
with
2,270 additions
and
1,637 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
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
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
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 |
---|---|---|
|
@@ -702,6 +702,53 @@ func TestFixMQSinkProtocol(t *testing.T) { | |
} | ||
} | ||
|
||
func TestFixMemoryQuotaIncompatible(t *testing.T) { | ||
t.Parallel() | ||
|
||
testCases := []struct { | ||
info *ChangeFeedInfo | ||
expectedMemoryQuota uint64 | ||
}{ | ||
{ | ||
info: &ChangeFeedInfo{ | ||
CreatorVersion: "", | ||
SinkURI: "mysql://root:[email protected]:3306/", | ||
Config: &config.ReplicaConfig{ | ||
Sink: &config.SinkConfig{Protocol: config.ProtocolDefault.String()}, | ||
}, | ||
}, | ||
expectedMemoryQuota: config.DefaultChangefeedMemoryQuota, | ||
}, | ||
{ | ||
info: &ChangeFeedInfo{ | ||
CreatorVersion: "6.5.0", | ||
SinkURI: "mysql://root:[email protected]:3306/", | ||
Config: &config.ReplicaConfig{ | ||
MemoryQuota: 0, | ||
Sink: &config.SinkConfig{Protocol: config.ProtocolDefault.String()}, | ||
}, | ||
}, | ||
expectedMemoryQuota: config.DefaultChangefeedMemoryQuota, | ||
}, | ||
{ | ||
info: &ChangeFeedInfo{ | ||
CreatorVersion: "6.5.0", | ||
SinkURI: "mysql://root:[email protected]:3306/", | ||
Config: &config.ReplicaConfig{ | ||
MemoryQuota: 10485760, | ||
Sink: &config.SinkConfig{Protocol: config.ProtocolDefault.String()}, | ||
}, | ||
}, | ||
expectedMemoryQuota: 10485760, | ||
}, | ||
} | ||
|
||
for _, tc := range testCases { | ||
tc.info.FixIncompatible() | ||
require.Equal(t, tc.expectedMemoryQuota, tc.info.Config.MemoryQuota) | ||
} | ||
} | ||
|
||
func TestChangeFeedInfoClone(t *testing.T) { | ||
t.Parallel() | ||
|
||
|
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
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
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
Oops, something went wrong.