From a81beba85cd0007f7081adf349434a3e056351a7 Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Wed, 24 Jul 2024 13:21:37 -0400 Subject: [PATCH] logictest: retry relocate stmt in a couple of places The capabilities are propagated asynchronously, so previously we could try to relocate ranges in the secondary tenant before the necessary capability was picked up. This was recently changed in 5f2a4f8af18dc83957ceb3c24cf9c6d7c79ee9e4. Release note: None --- .../logictest/testdata/logic_test/distsql_tenant_locality | 5 +++-- .../opt/exec/execbuilder/testdata/distsql_tenant_locality | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality b/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality index 18ef8e4112a3..057ada6dd873 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality +++ b/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality @@ -12,8 +12,9 @@ statement ok CREATE TABLE t (k INT PRIMARY KEY, v INT, FAMILY (k, v)); INSERT INTO t SELECT i, i FROM generate_series(1, 6) AS g(i) -# Upreplicate the table's range. -statement ok +# Upreplicate the table's range. We need a retry to guarantee that the +# capability has been picked up. +statement ok retry ALTER TABLE t EXPERIMENTAL_RELOCATE VALUES (ARRAY[1, 2, 3], 0) # Split the ranges in the table. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality index ea66b6106c22..8725baf7a56c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality @@ -12,8 +12,9 @@ user root statement ok CREATE TABLE t (k INT PRIMARY KEY, v INT, FAMILY (k, v)) -# Upreplicate the table's range. -statement ok +# Upreplicate the table's range. We need a retry to guarantee that the +# capability has been picked up. +statement ok retry ALTER TABLE t EXPERIMENTAL_RELOCATE VALUES (ARRAY[1, 2, 3], 0) # Split the ranges in the table.