Skip to content

Commit c932f6d

Browse files
authored
compute id has been supported (#9556) (#11273)
1 parent c3cadd1 commit c932f6d

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
@@ -255,7 +255,7 @@ class TCreateDatabaseRequestActor : public NActors::TActorBootstrapped<TCreateDa
255255
void FillRequest(TEvYdbCompute::TEvCreateDatabaseRequest::TPtr& ev, const NConfig::TComputeDatabaseConfig& config) {
256256
NYdb::NFq::TScope scope(ev.Get()->Get()->Scope);
257257
ev.Get()->Get()->BasePath = config.GetControlPlaneConnection().GetDatabase();
258-
const TString databaseName = Config.GetYdb().GetControlPlane().GetDatabasePrefix() + scope.ParseFolder();
258+
const TString databaseName = TStringBuilder{} << Config.GetYdb().GetControlPlane().GetDatabasePrefix() << (config.GetId() ? config.GetId() + "_" : TString{}) << scope.ParseFolder();
259259
ev.Get()->Get()->Path = config.GetTenant() ? config.GetTenant() + "/" + databaseName: databaseName;
260260
}
261261

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ message TLoadControlConfig {
3131
}
3232

3333
message TComputeDatabaseConfig {
34+
string Id = 7;
3435
TYdbStorageConfig ControlPlaneConnection = 1;
3536
TYdbStorageConfig SchemeConnection = 6;
3637
TYdbStorageConfig ExecutionConnection = 3;
@@ -45,6 +46,7 @@ message TDatabaseMapping {
4546

4647
message TYdbComputeControlPlane {
4748
message TSingle {
49+
string Id = 3;
4850
TYdbStorageConfig Connection = 1;
4951
}
5052

0 commit comments

Comments
 (0)