Skip to content

Commit 8a1999f

Browse files
committed
review fix ydb-platform#2
- remove the new option to control index impl tables partition split boundaries inclusion in the describe result of a table from public API. We will work on `ydb tools dump` later to enable it to save index tables split boundaries.
1 parent f0791ef commit 8a1999f

File tree

6 files changed

+7
-40
lines changed

6 files changed

+7
-40
lines changed

ydb/core/grpc_services/rpc_describe_table.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,10 @@ class TDescribeTableRPC : public TRpcSchemeRequestActor<TDescribeTableRPC, TEvDe
205205
SetDatabase(navigateRequest.get(), *Request_);
206206
NKikimrSchemeOp::TDescribePath* record = navigateRequest->Record.MutableDescribePath();
207207
record->SetPath(path);
208-
209208
if (req->include_shard_key_bounds()) {
210209
record->MutableOptions()->SetReturnBoundaries(true);
211210
}
212-
if (req->include_index_table_shard_key_bounds()) {
213-
record->MutableOptions()->SetReturnIndexTableBoundaries(true);
214-
}
211+
215212
if (req->include_partition_stats() && req->include_table_stats()) {
216213
record->MutableOptions()->SetReturnPartitionStats(true);
217214
}

ydb/library/backup/backup.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,7 @@ NTable::TTableDescription DescribeTable(TDriver driver, const TString& fullTable
373373
NTable::TTableClient client(driver);
374374

375375
TStatus status = client.RetryOperationSync([fullTablePath, &desc](NTable::TSession session) {
376-
auto settings = NTable::TDescribeTableSettings()
377-
.WithKeyShardBoundary(true)
378-
.WithIndexTableKeyShardBoundary(true);
376+
auto settings = NTable::TDescribeTableSettings().WithKeyShardBoundary(true);
379377
auto result = session.DescribeTable(fullTablePath, settings).GetValueSync();
380378

381379
VerifyStatus(result);

ydb/public/api/protos/ydb_table.proto

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ message VectorIndexSettings {
7272
SIMILARITY_UNSPECIFIED = 0;
7373
SIMILARITY_COSINE = 1;
7474
SIMILARITY_INNER_PRODUCT = 2;
75-
}
75+
}
7676

7777
enum VectorType {
7878
VECTOR_TYPE_UNSPECIFIED = 0;
@@ -773,16 +773,12 @@ message DescribeTableRequest {
773773
// Full path
774774
string path = 2;
775775
Ydb.Operations.OperationParams operation_params = 4;
776-
// Includes partition boundaries (the key values where the partitions are split)
776+
// Includes shard key distribution info
777777
bool include_shard_key_bounds = 5;
778778
// Includes table statistics
779779
bool include_table_stats = 6;
780780
// Includes partition statistics (required include_table_statistics)
781781
bool include_partition_stats = 7;
782-
// Note: The following flag applies only if the described table has indices.
783-
// Includes partition boundaries (the key values where the partitions are split)
784-
// for tables that implement indices of the described table.
785-
bool include_index_table_shard_key_bounds = 8;
786782
}
787783

788784
message DescribeTableResponse {

ydb/public/sdk/cpp/client/ydb_table/impl/table_client.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,16 +513,14 @@ TAsyncDescribeTableResult TTableClient::TImpl::DescribeTable(const TString& sess
513513
auto request = MakeOperationRequest<Ydb::Table::DescribeTableRequest>(settings);
514514
request.set_session_id(sessionId);
515515
request.set_path(path);
516-
517516
if (settings.WithKeyShardBoundary_) {
518517
request.set_include_shard_key_bounds(true);
519518
}
520-
if (settings.WithIndexTableKeyShardBoundary_) {
521-
request.set_include_index_table_shard_key_bounds(true);
522-
}
519+
523520
if (settings.WithTableStatistics_) {
524521
request.set_include_table_stats(true);
525522
}
523+
526524
if (settings.WithPartitionStatistics_) {
527525
request.set_include_partition_stats(true);
528526
}

ydb/public/sdk/cpp/client/ydb_table/table.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,6 @@ struct TRenameTablesSettings : public TOperationRequestSettings<TRenameTablesSet
16271627

16281628
struct TDescribeTableSettings : public TOperationRequestSettings<TDescribeTableSettings> {
16291629
FLUENT_SETTING_DEFAULT(bool, WithKeyShardBoundary, false);
1630-
FLUENT_SETTING_DEFAULT(bool, WithIndexTableKeyShardBoundary, false);
16311630
FLUENT_SETTING_DEFAULT(bool, WithTableStatistics, false);
16321631
FLUENT_SETTING_DEFAULT(bool, WithPartitionStatistics, false);
16331632
};

ydb/services/ydb/backup_ut/ydb_backup_ut.cpp

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -416,28 +416,7 @@ Y_UNIT_TEST_SUITE(BackupRestore) {
416416
);
417417
}
418418

419-
Y_UNIT_TEST(RestoreIndexTableSplitBoundaries) {
420-
TKikimrWithGrpcAndRootSchema server;
421-
auto driver = TDriver(TDriverConfig().SetEndpoint(Sprintf("localhost:%u", server.GetPort())));
422-
TTableClient tableClient(driver);
423-
auto session = tableClient.GetSession().ExtractValueSync().GetSession();
424-
TTempDir tempDir;
425-
const auto& pathToBackup = tempDir.Path();
426-
427-
constexpr const char* table = "/Root/table";
428-
constexpr const char* index = "byValue";
429-
constexpr ui64 indexPartitions = 10;
430-
431-
TestIndexTableSplitBoundariesArePreserved(
432-
table,
433-
index,
434-
indexPartitions,
435-
session,
436-
CreateBackupLambda(driver, pathToBackup, true),
437-
CreateRestoreLambda(driver, pathToBackup)
438-
);
439-
}
440-
419+
// TO DO: test index impl table split boundaries restoration from a backup
441420
}
442421

443422
Y_UNIT_TEST_SUITE(BackupRestoreS3) {

0 commit comments

Comments
 (0)