Fetch fix. Style fix

This commit is contained in:
Igor Mineev 2019-05-21 17:06:33 +03:00
parent 756f991a2a
commit f504c21229
3 changed files with 6 additions and 6 deletions

View File

@ -112,7 +112,7 @@ void Service::processQuery(const Poco::Net::HTMLForm & params, ReadBuffer & /*bo
for (const auto &it : checksums.files) for (const auto &it : checksums.files)
{ {
String file_name = it.first; String file_name = it.first;
String path = part->getFullPath() + part_name + "/" + file_name; String path = part->getFullPath() + file_name;
all_part_files_size += Poco::File(path).getSize(); all_part_files_size += Poco::File(path).getSize();
} }
writeBinary(all_part_files_size, out); writeBinary(all_part_files_size, out);
@ -124,7 +124,7 @@ void Service::processQuery(const Poco::Net::HTMLForm & params, ReadBuffer & /*bo
{ {
String file_name = it.first; String file_name = it.first;
String path = part->getFullPath() + part_name + "/" + file_name; String path = part->getFullPath() + file_name;
UInt64 size = Poco::File(path).getSize(); UInt64 size = Poco::File(path).getSize();

View File

@ -122,11 +122,10 @@ Schema::Volume::Volume(const Poco::Util::AbstractConfiguration & config, const s
{ {
max_data_part_size = std::numeric_limits<UInt64>::max(); max_data_part_size = std::numeric_limits<UInt64>::max();
} }
constexpr UInt64 SIZE_8MB = 1ull << 23; constexpr UInt64 SIZE_8MB = 8ull << 20u;
if (max_data_part_size < SIZE_8MB) { if (max_data_part_size < SIZE_8MB)
LOG_WARNING(logger, "Volume max_data_part_size is too low (" << max_data_part_size << " < " << SIZE_8MB << ")"); LOG_WARNING(logger, "Volume max_data_part_size is too low (" << max_data_part_size << " < " << SIZE_8MB << ")");
} }
}
DiskSpaceMonitor::ReservationPtr Schema::Volume::reserve(UInt64 expected_size) const DiskSpaceMonitor::ReservationPtr Schema::Volume::reserve(UInt64 expected_size) const
{ {

View File

@ -169,7 +169,8 @@ public:
: size(size_), metric_increment(CurrentMetrics::DiskSpaceReservedForMerge, size), disk_ptr(std::move(disk_ptr_)) ///@TODO_IGR ASK DiskSpaceReservedForMerge? : size(size_), metric_increment(CurrentMetrics::DiskSpaceReservedForMerge, size), disk_ptr(std::move(disk_ptr_)) ///@TODO_IGR ASK DiskSpaceReservedForMerge?
{ {
/// Just make reservation if size is 0 /// Just make reservation if size is 0
if (size == 0) { if (size == 0)
{
std::lock_guard lock(DiskSpaceMonitor::mutex); std::lock_guard lock(DiskSpaceMonitor::mutex);
reserves = &DiskSpaceMonitor::reserved[disk_ptr->getName()]; reserves = &DiskSpaceMonitor::reserved[disk_ptr->getName()];
++reserves->reservation_count; ++reserves->reservation_count;