Skip to content

Commit

Permalink
issue-2709: rename trx to RemoveOrphanDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
vladstepanyuk committed Dec 28, 2024
1 parent 9cc366f commit 2bf20fe
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void TDiskRegistryActor::CompleteLoadState(
"DeviceUUIDs=%s",
JoinSeq(" ", orphanDevices).c_str());

ExecuteTx<TCleanupOrphanDevices>(ctx, std::move(orphanDevices));
ExecuteTx<TRemoveOrphanDevices>(ctx, std::move(orphanDevices));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ using namespace NKikimr::NTabletFlatExecutor;

////////////////////////////////////////////////////////////////////////////////

bool TDiskRegistryActor::PrepareCleanupOrphanDevices(
bool TDiskRegistryActor::PrepareRemoveOrphanDevices(
const TActorContext& ctx,
TTransactionContext& tx,
TTxDiskRegistry::TCleanupOrphanDevices& args)
TTxDiskRegistry::TRemoveOrphanDevices& args)
{
Y_UNUSED(ctx);
Y_UNUSED(tx);
Expand All @@ -22,10 +22,10 @@ bool TDiskRegistryActor::PrepareCleanupOrphanDevices(
return true;
}

void TDiskRegistryActor::ExecuteCleanupOrphanDevices(
void TDiskRegistryActor::ExecuteRemoveOrphanDevices(
const TActorContext& ctx,
TTransactionContext& tx,
TTxDiskRegistry::TCleanupOrphanDevices& args)
TTxDiskRegistry::TRemoveOrphanDevices& args)
{
Y_UNUSED(ctx);

Expand All @@ -35,9 +35,9 @@ void TDiskRegistryActor::ExecuteCleanupOrphanDevices(
}
}

void TDiskRegistryActor::CompleteCleanupOrphanDevices(
void TDiskRegistryActor::CompleteRemoveOrphanDevices(
const TActorContext& ctx,
TTxDiskRegistry::TCleanupOrphanDevices& args)
TTxDiskRegistry::TRemoveOrphanDevices& args)
{
Y_UNUSED(args);
Y_UNUSED(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11912,7 +11912,7 @@ Y_UNIT_TEST_SUITE(TDiskRegistryStateTest)
UNIT_ASSERT_VALUES_EQUAL(2, criticalEvents->Val());
}

Y_UNIT_TEST(ShouldCleanupAlreadyLeakedDevices)
Y_UNIT_TEST(ShouldRemoveAlreadyLeakedDevices)
{
TTestExecutor executor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ Y_UNIT_TEST_SUITE(TDiskRegistryStateCMSTest)
});
}

Y_UNIT_TEST(ShouldCleanupDevicesFromOtherTables)
Y_UNIT_TEST(ShouldRemoveDevicesAfterAgentDelete)
{
TTestExecutor executor;
executor.WriteTx([&](TDiskRegistryDatabase db) { db.InitSchema(); });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace NCloud::NBlockStore::NStorage {
xxx(DeallocateCheckpoint, __VA_ARGS__) \
xxx(SetCheckpointDataState, __VA_ARGS__) \
xxx(PurgeHostCms, __VA_ARGS__) \
xxx(CleanupOrphanDevices, __VA_ARGS__) \
xxx(RemoveOrphanDevices, __VA_ARGS__) \
// BLOCKSTORE_DISK_REGISTRY_TRANSACTIONS

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1432,14 +1432,14 @@ struct TTxDiskRegistry
};

//
// CleanupOrphanDevices
// RemoveOrphanDevices
//

struct TCleanupOrphanDevices
struct TRemoveOrphanDevices
{
TVector<TString> OrphanDevices;

explicit TCleanupOrphanDevices(TVector<TString> orphanDevices)
explicit TRemoveOrphanDevices(TVector<TString> orphanDevices)
: OrphanDevices(std::move(orphanDevices))
{}

Expand Down
2 changes: 1 addition & 1 deletion cloud/blockstore/libs/storage/disk_registry/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SRCS(
disk_registry_actor_backup_state.cpp
disk_registry_actor_change_disk_device.cpp
disk_registry_actor_checkpoint.cpp
disk_registry_actor_cleanup_orphan_devices.cpp
disk_registry_actor_remove_orphan_devices.cpp
disk_registry_actor_cleanup.cpp
disk_registry_actor_cms.cpp
disk_registry_actor_config.cpp
Expand Down

0 comments on commit 2bf20fe

Please sign in to comment.