Skip to content

Commit

Permalink
Convert NRD disk type to LOCAL
Browse files Browse the repository at this point in the history
  • Loading branch information
komarevtsev-d committed Jan 30, 2025
1 parent 770a655 commit 590db32
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cloud/blockstore/libs/storage/disk_registry/benchmark/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,4 @@ ELSE()
INCLUDE(${ARCADIA_ROOT}/cloud/storage/core/tests/recipes/medium.inc)
ENDIF()

SRCS(
../disk_registry_state_benchmark.cpp
)

PEERDIR(
cloud/blockstore/libs/storage/disk_registry/testlib
)

END()
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,10 @@ void TDiskRegistryActor::RenderDiskHtmlInfo(
<< "</a>";
}
DIV() { out << "State: "; DumpDiskState(out, info.State); }
DIV() {
out << "Volume media kind: "
<< NProto::EStorageMediaKind_Name(masterDiskInfo.MediaKind);
}
DIV() { out << "State timestamp: " << info.StateTs; }
if (info.MigrationStartTs) {
DIV() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,20 @@ void TDiskRegistryState::ProcessDisks(TVector<NProto::TDiskConfig> configs)
disk.MediaKind = NProto::STORAGE_MEDIA_SSD_NONREPLICATED;
disk.MigrationStartTs = TInstant::MicroSeconds(config.GetMigrationStartTs());

if (config.GetStorageMediaKind() ==
NProto::STORAGE_MEDIA_SSD_NONREPLICATED)
{
for (const auto& deviceId: disk.Devices) {
const auto* device = FindDevice(deviceId);
if (device &&
device->GetPoolKind() == NProto::DEVICE_POOL_KIND_LOCAL)
{
config.SetStorageMediaKind(NProto::STORAGE_MEDIA_SSD_LOCAL);
break;
}
}
}

for (auto& hi: *config.MutableHistory()) {
disk.History.push_back(std::move(hi));
}
Expand Down

0 comments on commit 590db32

Please sign in to comment.