Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: remove the special limit of txn-total-size-limit when binlog enabled (#16919) #16941

Merged
merged 1 commit into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,6 @@ func (c *Config) Valid() error {
return fmt.Errorf("grpc-connection-count should be greater than 0")
}

if c.Performance.TxnTotalSizeLimit > 100<<20 && c.Binlog.Enable {
return fmt.Errorf("txn-total-size-limit should be less than %d with binlog enabled", 100<<20)
}
if c.Performance.TxnTotalSizeLimit > 10<<30 {
return fmt.Errorf("txn-total-size-limit should be less than %d", 10<<30)
}
Expand Down
5 changes: 3 additions & 2 deletions config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ distinct-agg-push-down = false

# The limitation of the size in byte for the entries in one transaction.
# If using TiKV as the storage, the entry represents a key/value pair.
# NOTE: If binlog is enabled, this value should be less than 104857600(10M) because this is the maximum size that can be handled by Pumper.
# If binlog is not enabled, this value should be less than 10737418240(10G).
# NOTE: If binlog is enabled with Kafka (e.g. arbiter cluster),
# this value should be less than 1073741824(1G) because this is the maximum size that can be handled by Kafka.
# If binlog is disabled or binlog is enabled without Kafka, this value should be less than 10737418240(10G).
txn-total-size-limit = 104857600

# The max number of running concurrency two phase committer request for an SQL.
Expand Down
4 changes: 0 additions & 4 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,6 @@ func (s *testConfigSuite) TestTxnTotalSizeLimitValid(c *C) {
conf.Performance.TxnTotalSizeLimit = tt.limit
c.Assert(conf.Valid() == nil, Equals, tt.valid)
}

conf.Binlog.Enable = true
conf.Performance.TxnTotalSizeLimit = 100<<20 + 1
c.Assert(conf.Valid(), NotNil)
}

func (s *testConfigSuite) TestAllowAutoRandomValid(c *C) {
Expand Down