forked from pingcap/tidb
-
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.
Merge remote-tracking branch 'upstream/master' into kill-ddl
* upstream/master: sessionctx: support encoding and decoding session variables (pingcap#35531) planner: add batch_point_get access object (pingcap#35230) sessionctx: set skipInit false for TiDBOptProjectionPushDown and TiDBOptAggPushDown (pingcap#35491) *: add support for disabling noop variables (pingcap#35496) lightning: add store write limiter (pingcap#35193) expression: avoid padding 0 when implicitly cast to binary (pingcap#35053) types: fix creating partition tables fail in ANSI_QUOTES mode (pingcap#35379) executor: add the missed runtime stats when the index merge partial task returns 0 row (pingcap#35297) statistics: batch insert topn and bucket when saving table stats (pingcap#35326) parser: Add support for INTERVAL expr unit + expr (pingcap#30253) (pingcap#35390) config: add missing nodelay example (pingcap#35255) *: Introduce `OptimisticTxnContextProvider` for optimistic txn (pingcap#35131) statistics: fix panic when using wrong globalStats.Indices key (pingcap#35424) *: fix store token is up to the limit in test (pingcap#35374) *: enable more flaky and update bazel config (pingcap#35500) ddl: expose getPrimaryKey() as a public method of model.TableInfo (pingcap#35512) expression, util: add `KeyWithoutTrimRightSpace` for collator (pingcap#35475) infoschema: try on each PD member until one succeeds or all fail (pingcap#35285)
- Loading branch information
Showing
103 changed files
with
8,072 additions
and
6,451 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[tikv-importer] | ||
store-write-bwlimit = "1Mi" | ||
|
||
[mydumper.csv] | ||
header = false |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2022 PingCAP, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -eux | ||
|
||
mkdir -p "$TEST_DIR/data" | ||
|
||
cat <<EOF >"$TEST_DIR/data/test-schema-create.sql" | ||
CREATE DATABASE test; | ||
EOF | ||
cat <<EOF >"$TEST_DIR/data/test.t-schema.sql" | ||
CREATE TABLE test.t ( | ||
id int, | ||
a int, | ||
b int, | ||
c int | ||
); | ||
EOF | ||
|
||
# Generate 200k rows. Total size is about 5MiB. | ||
set +x | ||
for i in {1..200000}; do | ||
echo "$i,$i,$i,$i" >>"$TEST_DIR/data/test.t.0.csv" | ||
done | ||
set -x | ||
|
||
start=$(date +%s) | ||
run_lightning --backend local -d "$TEST_DIR/data" --config "tests/$TEST_NAME/config.toml" | ||
end=$(date +%s) | ||
take=$((end - start)) | ||
|
||
# The encoded kv size is 10MiB. Usually it should take more than 10s. | ||
if [ $take -lt 10 ]; then | ||
echo "Lightning runs too fast. The write limiter doesn't work." | ||
exit 1 | ||
fi |
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.