mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
rgwlc: correctly dimension lc shard index vector
The new parallel lc code relies on a vector of indexes to seed random-order shard processing. This vector was dimensioned to n (the shard count) - 1--which appears to elide the high index. Found and reported by Ji Weiqiang <badwolflord@163.com> Fixes: https://tracker.ceph.com/issues/48255 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
parent
8d4a8735c3
commit
988c35b374
@ -1658,7 +1658,7 @@ int RGWLC::list_lc_progress(string& marker, uint32_t max_entries,
|
||||
|
||||
static inline vector<int> random_sequence(uint32_t n)
|
||||
{
|
||||
vector<int> v(n-1, 0);
|
||||
vector<int> v(n, 0);
|
||||
std::generate(v.begin(), v.end(),
|
||||
[ix = 0]() mutable {
|
||||
return ix++;
|
||||
|
Loading…
Reference in New Issue
Block a user