From 4bfc39fe525f024c013c15b20b44e779247ea472 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Wed, 29 Apr 2020 21:40:18 +0800 Subject: [PATCH] config: remove the special limit of txn-total-size-limit when binlog enabled (#16919) --- config/config.go | 3 --- config/config.toml.example | 5 +++-- config/config_test.go | 4 ---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/config/config.go b/config/config.go index e7a931b748..20afd4dcba 100644 --- a/config/config.go +++ b/config/config.go @@ -828,9 +828,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) } diff --git a/config/config.toml.example b/config/config.toml.example index 43b3e875ec..fafaa39056 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -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. diff --git a/config/config_test.go b/config/config_test.go index 973f81e950..52dc1dd12f 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -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) {