Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-2947: don't backup tablet info in temporary server #2978

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

vladstepanyuk marked this conversation as resolved.
Show resolved Hide resolved
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
? ""
vladstepanyuk marked this conversation as resolved.
Show resolved Hide resolved
: 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 = "";
vladstepanyuk marked this conversation as resolved.
Show resolved Hide resolved

TTestBasicRuntime runtime;
TTestEnv env(runtime, cacheFilePath);

auto sender = runtime.AllocateEdgeActor();

env.SendBackupTabletBootInfos(sender, S_FALSE);
}

Y_UNIT_TEST(BootExternalInFallbackMode)
{
TString cacheFilePath =
Expand Down
Loading