From 74e4bc06b17aa92bd8ad7ecfd79587c6ef94c833 Mon Sep 17 00:00:00 2001 From: tenfyzhong Date: Tue, 31 Mar 2026 18:37:04 +0800 Subject: [PATCH 1/3] tests: support cloud-engine next gen startup Signed-off-by: tenfyzhong --- .../_utils/start_tidb_cluster_nextgen | 17 +++++++++++++++-- .../_utils/start_tls_tidb_cluster_impl_nextgen | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/_utils/start_tidb_cluster_nextgen b/tests/integration_tests/_utils/start_tidb_cluster_nextgen index 2f91b3af27..e4e4518513 100755 --- a/tests/integration_tests/_utils/start_tidb_cluster_nextgen +++ b/tests/integration_tests/_utils/start_tidb_cluster_nextgen @@ -95,6 +95,15 @@ if [ -z "$OUT_DIR" ]; then exit 1 fi +echo "Checking TiKV version information..." +tikvVersionInfo=$(tikv-server -V 2>&1) +printf '%s\n' "$tikvVersionInfo" +tikvGitCommitBranch=$(printf '%s\n' "$tikvVersionInfo" | sed -nE 's/^Git Commit Branch:[[:space:]]*([^[:space:]]+).*$/\1/p' | head -n 1) +tikvNeedsCdcEnable=false +if [ "$tikvGitCommitBranch" = "cloud-engine" ]; then + tikvNeedsCdcEnable=true +fi + # start minio echo "Starting MinIO server..." mkdir -p "$TEST_DATA_DIR/minio" @@ -221,6 +230,12 @@ lightweight-backup = true target-file-size = "512MB" wal-chunk-target-file-size = "128MB" EOF +if [ "$tikvNeedsCdcEnable" = "true" ]; then + cat >>"$OUT_DIR/upstream-tikv.toml" <&1) +printf '%s\n' "$tikvVersionInfo" +tikvGitCommitBranch=$(printf '%s\n' "$tikvVersionInfo" | sed -nE 's/^Git Commit Branch:[[:space:]]*([^[:space:]]+).*$/\1/p' | head -n 1) +tikvNeedsCdcEnable=false +if [ "$tikvGitCommitBranch" = "cloud-engine" ]; then + tikvNeedsCdcEnable=true +fi + # Tries to limit the max number of open files under the system limit cat - >"$OUT_DIR/tikv-config-tls.toml" <>"$OUT_DIR/tikv-config-tls.toml" <"$OUT_DIR/tikv-worker-tls.toml" < Date: Tue, 31 Mar 2026 18:47:07 +0800 Subject: [PATCH 2/3] tests: enable cdc for downstream next gen tikv Signed-off-by: tenfyzhong --- tests/integration_tests/_utils/start_tidb_cluster_nextgen | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration_tests/_utils/start_tidb_cluster_nextgen b/tests/integration_tests/_utils/start_tidb_cluster_nextgen index e4e4518513..b315901961 100755 --- a/tests/integration_tests/_utils/start_tidb_cluster_nextgen +++ b/tests/integration_tests/_utils/start_tidb_cluster_nextgen @@ -260,6 +260,12 @@ lightweight-backup = true target-file-size = "512MB" wal-chunk-target-file-size = "128MB" EOF +if [ "$tikvNeedsCdcEnable" = "true" ]; then + cat >>"$OUT_DIR/downstream-tikv.toml" < Date: Wed, 1 Apr 2026 20:56:14 +0800 Subject: [PATCH 3/3] chore(tikv): remove conditional CDC enablement and simplify version check - Remove branch detection logic for TiKV version - Always enable CDC in TiKV configuration files - Simplify TiKV version check to just display output without parsing - This eliminates conditional logic that was specific to 'cloud-engine' branch Signed-off-by: tenfyzhong --- .../_utils/start_tidb_cluster_nextgen | 18 +++--------------- .../_utils/start_tls_tidb_cluster_impl_nextgen | 13 ++----------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/tests/integration_tests/_utils/start_tidb_cluster_nextgen b/tests/integration_tests/_utils/start_tidb_cluster_nextgen index b315901961..76fdfd6ea1 100755 --- a/tests/integration_tests/_utils/start_tidb_cluster_nextgen +++ b/tests/integration_tests/_utils/start_tidb_cluster_nextgen @@ -96,13 +96,7 @@ if [ -z "$OUT_DIR" ]; then fi echo "Checking TiKV version information..." -tikvVersionInfo=$(tikv-server -V 2>&1) -printf '%s\n' "$tikvVersionInfo" -tikvGitCommitBranch=$(printf '%s\n' "$tikvVersionInfo" | sed -nE 's/^Git Commit Branch:[[:space:]]*([^[:space:]]+).*$/\1/p' | head -n 1) -tikvNeedsCdcEnable=false -if [ "$tikvGitCommitBranch" = "cloud-engine" ]; then - tikvNeedsCdcEnable=true -fi +tikv-server -V # start minio echo "Starting MinIO server..." @@ -229,13 +223,10 @@ 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" -EOF -if [ "$tikvNeedsCdcEnable" = "true" ]; then - cat >>"$OUT_DIR/upstream-tikv.toml" <>"$OUT_DIR/downstream-tikv.toml" <&1) -printf '%s\n' "$tikvVersionInfo" -tikvGitCommitBranch=$(printf '%s\n' "$tikvVersionInfo" | sed -nE 's/^Git Commit Branch:[[:space:]]*([^[:space:]]+).*$/\1/p' | head -n 1) -tikvNeedsCdcEnable=false -if [ "$tikvGitCommitBranch" = "cloud-engine" ]; then - tikvNeedsCdcEnable=true -fi +tikv-server -V # Tries to limit the max number of open files under the system limit cat - >"$OUT_DIR/tikv-config-tls.toml" <>"$OUT_DIR/tikv-config-tls.toml" <"$OUT_DIR/tikv-worker-tls.toml" <