diff --git a/lightning/kv/importer.go b/lightning/kv/importer.go index 6b3377326..460596e8c 100644 --- a/lightning/kv/importer.go +++ b/lightning/kv/importer.go @@ -148,8 +148,8 @@ func makeTag(tableName string, engineID int) string { var engineNamespace = uuid.Must(uuid.FromString("d68d6abe-c59e-45d6-ade8-e2b0ceb7bedf")) -// OpenEngine opens an engine with the given UUID. This type is goroutine safe: -// you can share this instance and execute any method anywhere. +// OpenEngine opens an engine with the given table name and engine ID. This type +// is goroutine safe: you can share this instance and execute any method anywhere. func (importer *Importer) OpenEngine( ctx context.Context, tableName string, diff --git a/tests/checkpoint_engines/config.toml b/tests/checkpoint_engines/config.toml index e9f041998..190f76280 100644 --- a/tests/checkpoint_engines/config.toml +++ b/tests/checkpoint_engines/config.toml @@ -13,7 +13,7 @@ addr = "127.0.0.1:8808" [mydumper] data-source-dir = "tests/checkpoint_engines/data" -batch-size = 1 # force creating a new batch for every file. +batch-size = 60 # force splitting the data into 4 batches [tidb] host = "127.0.0.1" diff --git a/tests/checkpoint_engines/data/cpeng.a.1.sql b/tests/checkpoint_engines/data/cpeng.a.1.sql index 25d96b2c4..58829b7d8 100644 --- a/tests/checkpoint_engines/data/cpeng.a.1.sql +++ b/tests/checkpoint_engines/data/cpeng.a.1.sql @@ -1 +1 @@ -insert into a values (1),(2); +insert into a values (1); diff --git a/tests/checkpoint_engines/data/cpeng.a.2.sql b/tests/checkpoint_engines/data/cpeng.a.2.sql index effdc8f3e..ccbcb5801 100644 --- a/tests/checkpoint_engines/data/cpeng.a.2.sql +++ b/tests/checkpoint_engines/data/cpeng.a.2.sql @@ -1 +1 @@ -insert into a values (3),(4); +insert into a values (2); diff --git a/tests/checkpoint_engines/data/cpeng.a.3.sql b/tests/checkpoint_engines/data/cpeng.a.3.sql new file mode 100644 index 000000000..effdc8f3e --- /dev/null +++ b/tests/checkpoint_engines/data/cpeng.a.3.sql @@ -0,0 +1 @@ +insert into a values (3),(4); diff --git a/tests/checkpoint_engines/data/cpeng.b.1.sql b/tests/checkpoint_engines/data/cpeng.b.1.sql index 3cee7f262..342c150d9 100644 --- a/tests/checkpoint_engines/data/cpeng.b.1.sql +++ b/tests/checkpoint_engines/data/cpeng.b.1.sql @@ -1 +1,4 @@ insert into b values (10),(11),(12); +/* +padding to make the data file > 50 bytes +*/ \ No newline at end of file diff --git a/tests/checkpoint_engines/mysql.toml b/tests/checkpoint_engines/mysql.toml index 5947da587..ff00fad82 100644 --- a/tests/checkpoint_engines/mysql.toml +++ b/tests/checkpoint_engines/mysql.toml @@ -13,7 +13,7 @@ addr = "127.0.0.1:8808" [mydumper] data-source-dir = "tests/checkpoint_engines/data" -batch-size = 1 # force creating a new batch for every file. +batch-size = 50 # force splitting the data into 4 batches [tidb] host = "127.0.0.1"