fix skipping of remote disks

This commit is contained in:
serxa 2024-06-10 15:21:18 +00:00
parent 41cca9df1a
commit dcbcfc9ee8

View File

@ -210,9 +210,8 @@ void ServerAsynchronousMetrics::updateImpl(TimePoint update_time, TimePoint curr
auto total = disk->getTotalSpace(); auto total = disk->getTotalSpace();
/// Some disks don't support information about the space. /// Some disks don't support information about the space.
if (!total) if (total)
continue; {
auto available = disk->getAvailableSpace(); auto available = disk->getAvailableSpace();
auto unreserved = disk->getUnreservedSpace(); auto unreserved = disk->getUnreservedSpace();
@ -231,6 +230,7 @@ void ServerAsynchronousMetrics::updateImpl(TimePoint update_time, TimePoint curr
if (unreserved) if (unreserved)
new_values[fmt::format("DiskUnreserved_{}", name)] = { *unreserved, new_values[fmt::format("DiskUnreserved_{}", name)] = { *unreserved,
"Available bytes on the disk (virtual filesystem) without the reservations for merges, fetches, and moves. Remote filesystems may not provide this information." }; "Available bytes on the disk (virtual filesystem) without the reservations for merges, fetches, and moves. Remote filesystems may not provide this information." };
}
try try
{ {