Commit 8f28e099 authored by David Auer's avatar David Auer
Browse files

DistRandSlice: Add comment about adding many disks

parent a63a42d7
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -213,6 +213,10 @@ DistRandSlice::removeDisks(const std::vector<uint64_t>& disk_ids) {
    //
    // NOTE: We could distribute the remainder proportionally among the new
    // partitions, but this way is faster and the remainder is neglectable

    // TODO this could be the issue we run into when adding ~ 1000 or more
    // disks at once. The remainder is still neglectable in practice but
    // triggerse the sanity checks. Workaround: Add disks in batches < 800
    if(num_blocks_to_remove != num_blocks_to_add) {
        uint64_t r = num_blocks_to_remove - num_blocks_to_add;
#if defined DEBUG