Fix DataBlockList::DataSize()

Parameters got filled opposite to what they were supposed to be and
also didn't consider cutoffs that land in the middle of a block.
This commit is contained in:
Jon Siwek 2019-09-24 10:21:20 -07:00
parent e30035910e
commit 5ce68bd20a
2 changed files with 14 additions and 5 deletions

View file

@ -155,12 +155,13 @@ public:
{ return total_data_size; }
/**
* Counts the total size of all list elements paritioned by some cuttof.
* Counts the total size of all data contained in list elements
* partitioned by some cutoff.
* WARNING: this is an O(n) operation and potentially very slow.
* @param seq_cutoff the sequence number used to partition
* element sizes returned via "below" and "above" parameters
* @param below the size in bytes of all elements below "seq_cutoff"
* @param above the size in bytes of all elements above "seq_cutoff"
* @param below the size in bytes of all data below "seq_cutoff"
* @param above the size in bytes of all data above "seq_cutoff"
*/
void DataSize(uint64_t seq_cutoff, uint64_t* below, uint64_t* above) const;