Skip to content
Merged
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
26 changes: 11 additions & 15 deletions tests/integration_tests/_utils/start_tidb_cluster_nextgen
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,6 @@ s3-secret-key = "$MINIO_ROOT_PASSWORD"
s3-bucket = "cse-test-up"
s3-region = "local"

[rfengine]
wal-sync-dir = "$TEST_DATA_DIR/wal-sync/upstream/tikv/raft-wal"
lightweight-backup = true
target-file-size = "512MB"
wal-chunk-target-file-size = "128MB"

[cdc]
enable = true
EOF
Expand Down Expand Up @@ -262,13 +256,23 @@ for idx in $(seq 1 3); do
host="UP_TIKV_HOST_$idx"
port="UP_TIKV_PORT_$idx"
status_port="UP_TIKV_STATUS_PORT_$idx"
upstream_tikv_config="$OUT_DIR/upstream-tikv$idx.toml"
cp "$OUT_DIR/upstream-tikv.toml" "$upstream_tikv_config"
cat >>"$upstream_tikv_config" <<EOF
[rfengine]
wal-sync-dir = "$TEST_DATA_DIR/wal-sync/upstream/tikv$idx/raft-wal"
lightweight-backup = true
target-file-size = "512MB"
wal-chunk-target-file-size = "128MB"
EOF
mkdir -p "$TEST_DATA_DIR/wal-sync/upstream/tikv$idx/raft-wal"
tikv-server \
--pd "${UP_PD_HOST_1}:${UP_PD_PORT_1}" \
-A "${!host}:${!port}" \
--status-addr "${!host}:${!status_port}" \
--log-file "$OUT_DIR/log/upstream/tikv/tikv$idx.log" \
--log-level info \
-C "$OUT_DIR/upstream-tikv.toml" \
-C "$upstream_tikv_config" \
-s "$TEST_DATA_DIR/upstream/tikv$idx" \
>"$OUT_DIR/log/upstream/tikv/tikv$idx-stdout.log" \
2>"$OUT_DIR/log/upstream/tikv/tikv$idx-stderr.log" &
Expand Down Expand Up @@ -349,14 +353,6 @@ tikv-worker --addr "$DOWN_TIKV_WORKER_HOST:$DOWN_TIKV_WORKER_PORT" \
check_port_available "$UP_TIKV_WORKER_HOST" "$UP_TIKV_WORKER_PORT" "Upstream TiKV-Worker is not ready yet"
check_port_available "$DOWN_TIKV_WORKER_HOST" "$DOWN_TIKV_WORKER_PORT" "Downstream TiKV-Worker is not ready yet"

####################start TiDB####################
# TODO: replace this fixed delay with an explicit keyspace readiness check.
# PD health only guarantees the service is up. In next-gen bootstrap we also
# rely on PD finishing keyspace pre-allocation before the SYSTEM TiDB starts.
# Giving PD a short quiet window here reduces flaky startup failures in CI.
echo "Waiting for next-gen keyspace pre-allocation to settle..."
sleep 30

touch "$OUT_DIR/upstream-tidb-system.toml"
if [ -f "$tidb_config" ]; then
cat "$tidb_config" >>"$OUT_DIR/upstream-tidb-system.toml"
Expand Down
Loading