Skip to content

Commit

Permalink
issue-2947: don't backup tablet info in temporary server
Browse files Browse the repository at this point in the history
  • Loading branch information
vladstepanyuk committed Feb 5, 2025
1 parent d4b6efd commit 27cbc2c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cloud/blockstore/libs/daemon/ydb/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ void TBootstrapYdb::InitKikimrService()
args.EndpointEventHandler = EndpointEventHandler;
args.RootKmsKeyProvider = RootKmsKeyProvider;

args.TemporaryServer = Configs->Options->TemporaryServer;

ActorSystem = NStorage::CreateActorSystem(args);

if (args.IsDiskRegistrySpareNode) {
Expand Down
14 changes: 10 additions & 4 deletions cloud/blockstore/libs/storage/init/server/actorsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,17 @@ class TStorageServicesInitializer final
//

auto hiveProxy = CreateHiveProxy({
.PipeClientRetryCount = Args.StorageConfig->GetPipeClientRetryCount(),
.PipeClientMinRetryTime = Args.StorageConfig->GetPipeClientMinRetryTime(),
.HiveLockExpireTimeout = Args.StorageConfig->GetHiveLockExpireTimeout(),
.PipeClientRetryCount =
Args.StorageConfig->GetPipeClientRetryCount(),
.PipeClientMinRetryTime =
Args.StorageConfig->GetPipeClientMinRetryTime(),
.HiveLockExpireTimeout =
Args.StorageConfig->GetHiveLockExpireTimeout(),
.LogComponent = TBlockStoreComponents::HIVE_PROXY,
.TabletBootInfoBackupFilePath = Args.StorageConfig->GetTabletBootInfoBackupFilePath(),
.TabletBootInfoBackupFilePath =
Args.TemporaryServer
? ""
: Args.StorageConfig->GetTabletBootInfoBackupFilePath(),
.FallbackMode = Args.StorageConfig->GetHiveProxyFallbackMode(),
.TenantHiveTabletId = Args.StorageConfig->GetTenantHiveTabletId(),
});
Expand Down
1 change: 1 addition & 0 deletions cloud/blockstore/libs/storage/init/server/actorsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct TServerActorSystemArgs
TVector<NCloud::NStorage::IUserMetricsSupplierPtr> UserCounterProviders;

bool IsDiskRegistrySpareNode = false;
bool TemporaryServer = false;
};

////////////////////////////////////////////////////////////////////////////////
Expand Down
12 changes: 12 additions & 0 deletions cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,18 @@ Y_UNIT_TEST_SUITE(THiveProxyTest)
UNIT_ASSERT(env.HiveState->DownNodeIds.contains(sender.NodeId()));
}

Y_UNIT_TEST(DontBackupWithEmptyBootInfoFilePath)
{
TString cacheFilePath = "";

TTestBasicRuntime runtime;
TTestEnv env(runtime, cacheFilePath);

auto sender = runtime.AllocateEdgeActor();

env.SendBackupTabletBootInfos(sender, S_FALSE);
}

Y_UNIT_TEST(BootExternalInFallbackMode)
{
TString cacheFilePath =
Expand Down

0 comments on commit 27cbc2c

Please sign in to comment.