From 93f96c7cff49cd700c66d6032d53aad382fe94dd Mon Sep 17 00:00:00 2001 From: Maksim Zinal Date: Sat, 30 Dec 2023 19:33:49 +0300 Subject: [PATCH 1/4] Support RenameTables() operation in YDB Java SDK --- .../src/main/java/tech/ydb/table/Session.java | 11 ++++ .../java/tech/ydb/table/impl/BaseSession.java | 31 ++++++++++ .../java/tech/ydb/table/rpc/TableRpc.java | 9 +++ .../tech/ydb/table/rpc/grpc/GrpcTableRpc.java | 10 ++++ .../table/settings/RenameTablesSettings.java | 59 +++++++++++++++++++ .../test/java/tech/ydb/table/SessionStub.java | 6 ++ .../java/tech/ydb/table/TableRpcStub.java | 40 +++++++------ 7 files changed, 149 insertions(+), 17 deletions(-) create mode 100644 table/src/main/java/tech/ydb/table/settings/RenameTablesSettings.java diff --git a/table/src/main/java/tech/ydb/table/Session.java b/table/src/main/java/tech/ydb/table/Session.java index 13a521290..28b24b568 100644 --- a/table/src/main/java/tech/ydb/table/Session.java +++ b/table/src/main/java/tech/ydb/table/Session.java @@ -32,6 +32,7 @@ import tech.ydb.table.settings.PrepareDataQuerySettings; import tech.ydb.table.settings.ReadRowsSettings; import tech.ydb.table.settings.ReadTableSettings; +import tech.ydb.table.settings.RenameTablesSettings; import tech.ydb.table.settings.RollbackTxSettings; import tech.ydb.table.transaction.Transaction; import tech.ydb.table.transaction.TxControl; @@ -64,6 +65,8 @@ CompletableFuture createTable(String path, TableDescription tableDescrip CompletableFuture copyTables(CopyTablesSettings settings); + CompletableFuture renameTables(RenameTablesSettings settings); + CompletableFuture> describeTable(String path, DescribeTableSettings settings); CompletableFuture> prepareDataQuery(String query, PrepareDataQuerySettings settings); @@ -129,6 +132,14 @@ default CompletableFuture copyTable(String src, String dst) { return copyTable(src, dst, new CopyTableSettings()); } + default CompletableFuture renameTable(String src, String dst) { + return renameTables(new RenameTablesSettings().addTable(src, dst)); + } + + default CompletableFuture renameTable(String src, String dst, boolean overwrite) { + return renameTables(new RenameTablesSettings().addTable(src, dst, overwrite)); + } + default CompletableFuture> describeTable(String path) { return describeTable(path, new DescribeTableSettings()); } diff --git a/table/src/main/java/tech/ydb/table/impl/BaseSession.java b/table/src/main/java/tech/ydb/table/impl/BaseSession.java index 77eb5721a..190d30dbc 100644 --- a/table/src/main/java/tech/ydb/table/impl/BaseSession.java +++ b/table/src/main/java/tech/ydb/table/impl/BaseSession.java @@ -73,6 +73,7 @@ import tech.ydb.table.settings.PrepareDataQuerySettings; import tech.ydb.table.settings.ReadRowsSettings; import tech.ydb.table.settings.ReadTableSettings; +import tech.ydb.table.settings.RenameTablesSettings; import tech.ydb.table.settings.ReplicationPolicy; import tech.ydb.table.settings.RollbackTxSettings; import tech.ydb.table.settings.StoragePolicy; @@ -445,6 +446,36 @@ private List convertCopyTableItems(CopyTablesSettings ct }).collect(Collectors.toList()); } + @Override + public CompletableFuture renameTables(RenameTablesSettings settings) { + YdbTable.RenameTablesRequest request = YdbTable.RenameTablesRequest.newBuilder() + .setSessionId(id) + .addAllTables(convertRenameTableItems(settings)) + .build(); + + final GrpcRequestSettings grpcRequestSettings = makeGrpcRequestSettings(settings.getTimeoutDuration()); + return tableRpc.renameTables(request, grpcRequestSettings); + } + + private List convertRenameTableItems(RenameTablesSettings cts) { + final String dbpath = tableRpc.getDatabase(); + return cts.getItems().stream().map(t -> { + String sp = t.getSourcePath(); + if (!sp.startsWith("/")) { + sp = dbpath + "/" + sp; + } + String dp = t.getDestinationPath(); + if (!dp.startsWith("/")) { + dp = dbpath + "/" + dp; + } + return YdbTable.RenameTableItem.newBuilder() + .setSourcePath(sp) + .setDestinationPath(dp) + .setReplaceDestination(t.isReplaceDestination()) + .build(); + }).collect(Collectors.toList()); + } + @Override public CompletableFuture> describeTable(String path, DescribeTableSettings settings) { YdbTable.DescribeTableRequest request = YdbTable.DescribeTableRequest.newBuilder() diff --git a/table/src/main/java/tech/ydb/table/rpc/TableRpc.java b/table/src/main/java/tech/ydb/table/rpc/TableRpc.java index a60b59052..b49f2ddc5 100644 --- a/table/src/main/java/tech/ydb/table/rpc/TableRpc.java +++ b/table/src/main/java/tech/ydb/table/rpc/TableRpc.java @@ -36,6 +36,7 @@ import tech.ydb.proto.table.YdbTable.ReadRowsResponse; import tech.ydb.proto.table.YdbTable.ReadTableRequest; import tech.ydb.proto.table.YdbTable.ReadTableResponse; +import tech.ydb.proto.table.YdbTable.RenameTablesRequest; import tech.ydb.proto.table.YdbTable.RollbackTransactionRequest; @@ -121,6 +122,14 @@ CompletableFuture> createSession(CreateSessionReques */ CompletableFuture copyTables(CopyTablesRequest request, GrpcRequestSettings settings); + /** + * Renames the given tables, possibly replacing the existing destination tables. + * @param request request proto + * @param settings rpc call settings + * @return completable future with status of operation + */ + CompletableFuture renameTables(RenameTablesRequest request, GrpcRequestSettings settings); + /** * Returns information about given table (metadata). * @param request request proto diff --git a/table/src/main/java/tech/ydb/table/rpc/grpc/GrpcTableRpc.java b/table/src/main/java/tech/ydb/table/rpc/grpc/GrpcTableRpc.java index ee46cbe1b..03907d9af 100644 --- a/table/src/main/java/tech/ydb/table/rpc/grpc/GrpcTableRpc.java +++ b/table/src/main/java/tech/ydb/table/rpc/grpc/GrpcTableRpc.java @@ -53,6 +53,8 @@ import tech.ydb.proto.table.YdbTable.PrepareQueryResult; import tech.ydb.proto.table.YdbTable.ReadRowsRequest; import tech.ydb.proto.table.YdbTable.ReadRowsResponse; +import tech.ydb.proto.table.YdbTable.RenameTablesRequest; +import tech.ydb.proto.table.YdbTable.RenameTablesResponse; import tech.ydb.proto.table.YdbTable.RollbackTransactionRequest; import tech.ydb.proto.table.YdbTable.RollbackTransactionResponse; import tech.ydb.proto.table.v1.TableServiceGrpc; @@ -147,6 +149,14 @@ public CompletableFuture copyTables(CopyTablesRequest request, .thenApply(OperationManager.syncStatusUnwrapper(CopyTablesResponse::getOperation)); } + @Override + public CompletableFuture renameTables(RenameTablesRequest request, + GrpcRequestSettings settings) { + return transport + .unaryCall(TableServiceGrpc.getRenameTablesMethod(), settings, request) + .thenApply(OperationManager.syncStatusUnwrapper(RenameTablesResponse::getOperation)); + } + @Override public CompletableFuture> describeTable(DescribeTableRequest request, GrpcRequestSettings settings) { diff --git a/table/src/main/java/tech/ydb/table/settings/RenameTablesSettings.java b/table/src/main/java/tech/ydb/table/settings/RenameTablesSettings.java new file mode 100644 index 000000000..11b2be53d --- /dev/null +++ b/table/src/main/java/tech/ydb/table/settings/RenameTablesSettings.java @@ -0,0 +1,59 @@ +package tech.ydb.table.settings; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author Maksim Zinal + */ +public class RenameTablesSettings extends RequestSettings { + + private final List items = new ArrayList<>(); + + public List getItems() { + return items; + } + + public RenameTablesSettings addTable(String sourcePath, String destinationPath, + boolean replaceDestination) { + items.add(new Item(sourcePath, destinationPath, replaceDestination)); + return this; + } + + public RenameTablesSettings addTable(String sourcePath, String destinationPath) { + items.add(new Item(sourcePath, destinationPath)); + return this; + } + + public static class Item { + private final String sourcePath; + private final String destinationPath; + private final boolean replaceDestination; + + public Item(String sourcePath, String destinationPath, boolean replaceDestination) { + this.sourcePath = sourcePath; + this.destinationPath = destinationPath; + this.replaceDestination = replaceDestination; + } + + public Item(String sourcePath, String destinationPath) { + this.sourcePath = sourcePath; + this.destinationPath = destinationPath; + this.replaceDestination = false; + } + + public String getSourcePath() { + return sourcePath; + } + + public String getDestinationPath() { + return destinationPath; + } + + public boolean isReplaceDestination() { + return replaceDestination; + } + } + +} diff --git a/table/src/test/java/tech/ydb/table/SessionStub.java b/table/src/test/java/tech/ydb/table/SessionStub.java index f1eb59241..c6cfe9059 100644 --- a/table/src/test/java/tech/ydb/table/SessionStub.java +++ b/table/src/test/java/tech/ydb/table/SessionStub.java @@ -24,6 +24,7 @@ import tech.ydb.table.settings.CommitTxSettings; import tech.ydb.table.settings.CopyTableSettings; import tech.ydb.table.settings.CopyTablesSettings; +import tech.ydb.table.settings.RenameTablesSettings; import tech.ydb.table.settings.CreateTableSettings; import tech.ydb.table.settings.DescribeTableSettings; import tech.ydb.table.settings.DropTableSettings; @@ -89,6 +90,11 @@ public CompletableFuture copyTables(CopyTablesSettings settings) { return notImplemented("copyTables()"); } + @Override + public CompletableFuture renameTables(RenameTablesSettings settings) { + return notImplemented("renameTables()"); + } + @Override public CompletableFuture> describeTable(String path, DescribeTableSettings settings) { return notImplemented("describeTable()"); diff --git a/table/src/test/java/tech/ydb/table/TableRpcStub.java b/table/src/test/java/tech/ydb/table/TableRpcStub.java index 0520b7c03..d020449d6 100644 --- a/table/src/test/java/tech/ydb/table/TableRpcStub.java +++ b/table/src/test/java/tech/ydb/table/TableRpcStub.java @@ -11,7 +11,6 @@ import tech.ydb.core.grpc.GrpcRequestSettings; import tech.ydb.core.impl.call.EmptyStream; import tech.ydb.core.utils.Async; -import tech.ydb.proto.ValueProtos; import tech.ydb.proto.table.YdbTable; import tech.ydb.proto.table.YdbTable.AlterTableRequest; import tech.ydb.proto.table.YdbTable.BeginTransactionRequest; @@ -19,6 +18,7 @@ import tech.ydb.proto.table.YdbTable.CommitTransactionRequest; import tech.ydb.proto.table.YdbTable.CopyTableRequest; import tech.ydb.proto.table.YdbTable.CopyTablesRequest; +import tech.ydb.proto.table.YdbTable.RenameTablesRequest; import tech.ydb.proto.table.YdbTable.CreateSessionRequest; import tech.ydb.proto.table.YdbTable.CreateSessionResult; import tech.ydb.proto.table.YdbTable.CreateTableRequest; @@ -39,11 +39,11 @@ import tech.ydb.proto.table.YdbTable.RollbackTransactionRequest; import tech.ydb.table.rpc.TableRpc; - /** * @author Sergey Polovko */ public class TableRpcStub implements TableRpc { + private final ScheduledExecutorService scheduler; public TableRpcStub(ScheduledExecutorService scheduler) { @@ -52,73 +52,79 @@ public TableRpcStub(ScheduledExecutorService scheduler) { @Override public CompletableFuture> createSession(CreateSessionRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("createSession()"); } @Override public CompletableFuture deleteSession(DeleteSessionRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("deleteSession()"); } @Override public CompletableFuture> keepAlive(KeepAliveRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("keepAlive()"); } @Override public CompletableFuture createTable(CreateTableRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("createTable()"); } @Override public CompletableFuture dropTable(DropTableRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("dropTable()"); } @Override public CompletableFuture alterTable(AlterTableRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("alterTable()"); } @Override public CompletableFuture copyTable(CopyTableRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("copyTable()"); } @Override public CompletableFuture copyTables(CopyTablesRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("copyTables()"); } + @Override + public CompletableFuture renameTables(RenameTablesRequest request, + GrpcRequestSettings settings) { + return notImplemented("renameTables()"); + } + @Override public CompletableFuture> describeTable(DescribeTableRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("describeTable()"); } @Override public CompletableFuture> explainDataQuery(ExplainDataQueryRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("explainDataQuery()"); } @Override public CompletableFuture> prepareDataQuery(PrepareDataQueryRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("prepareDataQuery()"); } @Override public CompletableFuture> executeDataQuery(ExecuteDataQueryRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("executeDataQuery()"); } @@ -129,19 +135,19 @@ public CompletableFuture> readRows(YdbTable.ReadRowsReq @Override public CompletableFuture executeSchemeQuery(ExecuteSchemeQueryRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("executeSchemeQuery()"); } @Override public CompletableFuture> beginTransaction(BeginTransactionRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("beginTransaction()"); } @Override public CompletableFuture commitTransaction(CommitTransactionRequest request, - GrpcRequestSettings settings) { + GrpcRequestSettings settings) { return notImplemented("commitTransaction()"); } From 878c1d75fdb580a9b4f53d33d5779d019ecf67e2 Mon Sep 17 00:00:00 2001 From: Maksim Zinal Date: Sat, 30 Dec 2023 20:06:22 +0300 Subject: [PATCH 2/4] added a test for RenameTables operation --- .../table/integration/RenameTablesTest.java | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java diff --git a/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java new file mode 100644 index 000000000..44b7217fc --- /dev/null +++ b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java @@ -0,0 +1,135 @@ +package tech.ydb.table.integration; + +import java.util.Arrays; +import org.junit.Assert; +import org.junit.ClassRule; +import org.junit.Test; +import tech.ydb.core.Result; +import tech.ydb.core.Status; + +import tech.ydb.table.SessionRetryContext; +import tech.ydb.table.description.TableColumn; +import tech.ydb.table.description.TableDescription; +import tech.ydb.table.impl.SimpleTableClient; +import tech.ydb.table.rpc.grpc.GrpcTableRpc; +import tech.ydb.table.settings.CreateTableSettings; +import tech.ydb.table.settings.DescribeTableSettings; +import tech.ydb.table.settings.PartitioningSettings; +import tech.ydb.table.settings.RenameTablesSettings; +import tech.ydb.table.values.PrimitiveType; +import tech.ydb.test.junit4.GrpcTransportRule; + +/** + * @author Maksim Zinal + */ +public class RenameTablesTest { + @ClassRule + public final static GrpcTransportRule ydbTransport = new GrpcTransportRule(); + + private final SimpleTableClient tableClient = SimpleTableClient.newClient( + GrpcTableRpc.useTransport(ydbTransport) + ).build(); + + private final SessionRetryContext ctx = SessionRetryContext.create(tableClient).build(); + + private final String origTableName1 = "test1_table"; + private final String origTableName2 = "test2_table"; + + private final String renamedTableName1 = "test1_table_renamed"; + private final String renamedTableName2 = "test2_table_renamed"; + + private final String origTablePath1 = ydbTransport.getDatabase() + "/" + origTableName1; + private final String origTablePath2 = ydbTransport.getDatabase() + "/" + origTableName2; + + private final String renamedTablePath1 = ydbTransport.getDatabase() + "/" + renamedTableName1; + private final String renamedTablePath2 = ydbTransport.getDatabase() + "/" + renamedTableName2; + + @Test + public void testRenameTables() { + TableDescription tableDescription = TableDescription.newBuilder() + .addNullableColumn("id", PrimitiveType.Uint64) + .addNullableColumn("code", PrimitiveType.Text) + .addNullableColumn("size", PrimitiveType.Float) + .addNullableColumn("created", PrimitiveType.Timestamp) + .addNullableColumn("data", PrimitiveType.Json) + .setPrimaryKey("id") + .addGlobalIndex("ix1", Arrays.asList("code")) + .addGlobalAsyncIndex("ix2", Arrays.asList("created")) + .build(); + createTable(origTablePath1, tableDescription); + createTable(origTablePath2, tableDescription); + + renameTables(); + + describeTable(renamedTablePath1, tableDescription); + describeTable(renamedTablePath2, tableDescription); + + dropTable(renamedTablePath1); + dropTable(renamedTablePath2); + } + + private void createTable(String tablePath, TableDescription tableDescription) { + Status status = ctx.supplyStatus( + session -> session.createTable(tablePath, tableDescription, new CreateTableSettings()) + ).join(); + Assert.assertTrue("Create table " + status, status.isSuccess()); + } + + private void renameTables() { + RenameTablesSettings settings = new RenameTablesSettings(); + settings.addTable(origTablePath1, renamedTablePath1); + settings.addTable(origTablePath2, renamedTablePath2); + Status status = ctx.supplyStatus(session -> session.renameTables(settings)).join(); + Assert.assertTrue("Rename tables " + status, status.isSuccess()); + } + + private void describeTable(String tablePath, TableDescription tableDescription) { + Result describeResult = ctx.supplyResult(session -> { + return session.describeTable(tablePath); + }).join(); + Assert.assertTrue("Describe table " + describeResult.getStatus(), describeResult.isSuccess()); + + TableDescription description = describeResult.getValue(); + + Assert.assertEquals( + "Table description columns size", + tableDescription.getColumns().size(), + description.getColumns().size() + ); + + Assert.assertEquals( + "Table description primary keys size", + tableDescription.getPrimaryKeys().size(), + description.getPrimaryKeys().size() + ); + + Assert.assertEquals( + "Table description indexes size", + tableDescription.getIndexes().size(), + description.getIndexes().size() + ); + + for (int idx = 0; idx < tableDescription.getColumns().size(); idx += 1) { + TableColumn one = tableDescription.getColumns().get(idx); + TableColumn two = description.getColumns().get(idx); + + Assert.assertEquals("Table column name " + idx, one.getName(), two.getName()); + Assert.assertEquals("Table column type " + idx, one.getType(), two.getType()); + } + + for (int idx = 0; idx < tableDescription.getPrimaryKeys().size(); idx += 1) { + String one = tableDescription.getPrimaryKeys().get(idx); + String two = description.getPrimaryKeys().get(idx); + Assert.assertEquals("Table primary key " + idx, one, two); + } + } + + private void dropTable(String tablePath) { + Status status = ctx.supplyStatus( + session -> session.dropTable(tablePath) + ).join(); + + Assert.assertTrue("Drop table " + status, status.isSuccess()); + } + +} From b691ab0938f828eb3ab59498a40e1a620a4b2423 Mon Sep 17 00:00:00 2001 From: Maksim Zinal Date: Sat, 30 Dec 2023 20:19:37 +0300 Subject: [PATCH 3/4] include CopyTables() checks into RenameTables() integration test --- .../table/integration/RenameTablesTest.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java index 44b7217fc..271857d8c 100644 --- a/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java +++ b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java @@ -12,9 +12,8 @@ import tech.ydb.table.description.TableDescription; import tech.ydb.table.impl.SimpleTableClient; import tech.ydb.table.rpc.grpc.GrpcTableRpc; +import tech.ydb.table.settings.CopyTablesSettings; import tech.ydb.table.settings.CreateTableSettings; -import tech.ydb.table.settings.DescribeTableSettings; -import tech.ydb.table.settings.PartitioningSettings; import tech.ydb.table.settings.RenameTablesSettings; import tech.ydb.table.values.PrimitiveType; import tech.ydb.test.junit4.GrpcTransportRule; @@ -38,12 +37,18 @@ public class RenameTablesTest { private final String renamedTableName1 = "test1_table_renamed"; private final String renamedTableName2 = "test2_table_renamed"; + private final String copiedTableName1 = "test1_table_copied"; + private final String copiedTableName2 = "test2_table_copied"; + private final String origTablePath1 = ydbTransport.getDatabase() + "/" + origTableName1; private final String origTablePath2 = ydbTransport.getDatabase() + "/" + origTableName2; private final String renamedTablePath1 = ydbTransport.getDatabase() + "/" + renamedTableName1; private final String renamedTablePath2 = ydbTransport.getDatabase() + "/" + renamedTableName2; + private final String copiedTablePath1 = ydbTransport.getDatabase() + "/" + copiedTableName1; + private final String copiedTablePath2 = ydbTransport.getDatabase() + "/" + copiedTableName2; + @Test public void testRenameTables() { TableDescription tableDescription = TableDescription.newBuilder() @@ -56,6 +61,7 @@ public void testRenameTables() { .addGlobalIndex("ix1", Arrays.asList("code")) .addGlobalAsyncIndex("ix2", Arrays.asList("created")) .build(); + createTable(origTablePath1, tableDescription); createTable(origTablePath2, tableDescription); @@ -64,8 +70,15 @@ public void testRenameTables() { describeTable(renamedTablePath1, tableDescription); describeTable(renamedTablePath2, tableDescription); + copyTables(); + + describeTable(copiedTablePath1, tableDescription); + describeTable(copiedTablePath2, tableDescription); + dropTable(renamedTablePath1); dropTable(renamedTablePath2); + dropTable(copiedTablePath1); + dropTable(copiedTablePath2); } private void createTable(String tablePath, TableDescription tableDescription) { @@ -83,6 +96,14 @@ private void renameTables() { Assert.assertTrue("Rename tables " + status, status.isSuccess()); } + private void copyTables() { + CopyTablesSettings settings = new CopyTablesSettings(); + settings.addTable(renamedTablePath1, copiedTablePath1, true); + settings.addTable(renamedTablePath2, copiedTablePath2, true); + Status status = ctx.supplyStatus(session -> session.copyTables(settings)).join(); + Assert.assertTrue("Copy tables " + status, status.isSuccess()); + } + private void describeTable(String tablePath, TableDescription tableDescription) { Result describeResult = ctx.supplyResult(session -> { return session.describeTable(tablePath); From 9d2680a55294ae198f56bf499e4ea1c302dfb04d Mon Sep 17 00:00:00 2001 From: Maksim Zinal Date: Sat, 30 Dec 2023 20:23:55 +0300 Subject: [PATCH 4/4] set omitIndexes to false on CopyTables() in the integration test --- .../java/tech/ydb/table/integration/RenameTablesTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java index 271857d8c..dbc2a95d1 100644 --- a/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java +++ b/table/src/test/java/tech/ydb/table/integration/RenameTablesTest.java @@ -98,8 +98,8 @@ private void renameTables() { private void copyTables() { CopyTablesSettings settings = new CopyTablesSettings(); - settings.addTable(renamedTablePath1, copiedTablePath1, true); - settings.addTable(renamedTablePath2, copiedTablePath2, true); + settings.addTable(renamedTablePath1, copiedTablePath1, false); + settings.addTable(renamedTablePath2, copiedTablePath2, false); Status status = ctx.supplyStatus(session -> session.copyTables(settings)).join(); Assert.assertTrue("Copy tables " + status, status.isSuccess()); }