mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
Merge pull request #2088 from guangyy/wip-8733
Fix the PG listing issue which could miss objects for EC pool Reviewed-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
commit
f9d0e8ff10
@ -610,7 +610,11 @@ int ObjectStore::collection_list_range(coll_t c, hobject_t start, hobject_t end,
|
||||
snapid_t seq, vector<hobject_t> *ls)
|
||||
{
|
||||
vector<ghobject_t> go;
|
||||
ghobject_t gstart(start), gend(end);
|
||||
// Starts with the smallest shard id and generation to
|
||||
// make sure the result list has the marker object
|
||||
ghobject_t gstart(start, 0, shard_id_t(0));
|
||||
// Exclusive end, choose the smallest end ghobject
|
||||
ghobject_t gend(end, 0, shard_id_t(0));
|
||||
int ret = collection_list_range(c, gstart, gend, seq, &go);
|
||||
if (ret == 0) {
|
||||
ls->reserve(go.size());
|
||||
|
@ -116,7 +116,11 @@ int PGBackend::objects_list_partial(
|
||||
hobject_t *next)
|
||||
{
|
||||
assert(ls);
|
||||
ghobject_t _next(begin);
|
||||
// Starts with the smallest shard id and generation to
|
||||
// make sure the result list has the marker object (
|
||||
// it might have multiple generations though, which would
|
||||
// be filtered).
|
||||
ghobject_t _next(begin, 0, shard_id_t(0));
|
||||
ls->reserve(max);
|
||||
int r = 0;
|
||||
while (!_next.is_max() && ls->size() < (unsigned)min) {
|
||||
|
Loading…
Reference in New Issue
Block a user