diff --git a/src/Disks/IVolume.cpp b/src/Disks/IVolume.cpp index 48e6fbac936..e67ac9963e9 100644 --- a/src/Disks/IVolume.cpp +++ b/src/Disks/IVolume.cpp @@ -81,9 +81,9 @@ Disks MultiDiskReservation::getDisks() const { Disks res; res.reserve(reservations.size()); - for (const auto &r: reservations) + for (const auto & reservation : reservations) { - res.push_back(r->getDisk()); + res.push_back(reservation->getDisk()); } return res; } diff --git a/src/Disks/IVolume.h b/src/Disks/IVolume.h index 88f3e5226b2..4033ba1e543 100644 --- a/src/Disks/IVolume.h +++ b/src/Disks/IVolume.h @@ -67,7 +67,7 @@ protected: class MultiDiskReservation : public IReservation { public: - MultiDiskReservation(Reservations &reservations, UInt64 size); + MultiDiskReservation(Reservations & reservations, UInt64 size); UInt64 getSize() const override { return size; } diff --git a/src/Disks/VolumeJBOD.cpp b/src/Disks/VolumeJBOD.cpp index 7312f3d2365..6c0d9ec0a89 100644 --- a/src/Disks/VolumeJBOD.cpp +++ b/src/Disks/VolumeJBOD.cpp @@ -64,7 +64,8 @@ DiskPtr VolumeJBOD::getNextDisk() ReservationPtr VolumeJBOD::reserve(UInt64 bytes) { - /// This volume can not store files which size greater than max_data_part_size + /// This volume can not store data which size is greater than `max_data_part_size` + /// to ensure that parts of size greater than that go to another volume(s). if (max_data_part_size != 0 && bytes > max_data_part_size) return {}; diff --git a/src/Disks/VolumeRAID1.cpp b/src/Disks/VolumeRAID1.cpp index 764bea8e68a..6d30c6bb0bd 100644 --- a/src/Disks/VolumeRAID1.cpp +++ b/src/Disks/VolumeRAID1.cpp @@ -8,7 +8,8 @@ namespace DB ReservationPtr VolumeRAID1::reserve(UInt64 bytes) { - /// This volume can not store files which size greater than max_data_part_size + /// This volume can not store data which size is greater than `max_data_part_size` + /// to ensure that parts of size greater than that go to another volume(s). if (max_data_part_size != 0 && bytes > max_data_part_size) return {}; diff --git a/src/Disks/VolumeRAID1.h b/src/Disks/VolumeRAID1.h index 4452928445a..92d2b0267bf 100644 --- a/src/Disks/VolumeRAID1.h +++ b/src/Disks/VolumeRAID1.h @@ -8,7 +8,6 @@ namespace DB class VolumeRAID1 : public VolumeJBOD { - friend VolumePtr createVolumeFromReservation(const ReservationPtr & reservation, VolumePtr other_volume); public: VolumeRAID1(String name_, Disks disks_, UInt64 max_data_part_size_) : VolumeJBOD(name_, disks_, max_data_part_size_)