Skip to content

Commit 93e2e23

Browse files
authored
compute id has been supported (#9556)
1 parent f5d549e commit 93e2e23

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ydb/core/fq/libs/compute/ydb/control_plane/compute_database_control_plane_service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class TCreateDatabaseRequestActor : public NActors::TActorBootstrapped<TCreateDa
289289
void FillRequest(TEvYdbCompute::TEvCreateDatabaseRequest::TPtr& ev, const NConfig::TComputeDatabaseConfig& config) {
290290
NYdb::NFq::TScope scope(ev.Get()->Get()->Scope);
291291
ev.Get()->Get()->BasePath = config.GetControlPlaneConnection().GetDatabase();
292-
const TString databaseName = Config.GetYdb().GetControlPlane().GetDatabasePrefix() + scope.ParseFolder();
292+
const TString databaseName = TStringBuilder{} << Config.GetYdb().GetControlPlane().GetDatabasePrefix() << (config.GetId() ? config.GetId() + "_" : TString{}) << scope.ParseFolder();
293293
ev.Get()->Get()->Path = config.GetTenant() ? config.GetTenant() + "/" + databaseName: databaseName;
294294
}
295295

ydb/core/fq/libs/config/protos/compute.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ message TWorkloadManagerConfig {
4343
}
4444

4545
message TComputeDatabaseConfig {
46+
string Id = 7;
4647
TYdbStorageConfig ControlPlaneConnection = 1;
4748
TYdbStorageConfig SchemeConnection = 6;
4849
TYdbStorageConfig ExecutionConnection = 3;
@@ -58,6 +59,7 @@ message TDatabaseMapping {
5859

5960
message TYdbComputeControlPlane {
6061
message TSingle {
62+
string Id = 3;
6163
TYdbStorageConfig Connection = 1;
6264
TWorkloadManagerConfig WorkloadManagerConfig = 2;
6365
}

0 commit comments

Comments
 (0)