mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
rgw: RGWSI_RADOS::Pool::List::init() catches IoCtx::nobjects_begin() exceptions
Signed-off-by: lichaochao <lichaochao2_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
14176f00f4
commit
63c7d2a44b
@ -330,11 +330,21 @@ int RGWSI_RADOS::Pool::List::init(const DoutPrefixProvider *dpp, const string& m
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ctx.iter = ctx.ioctx.nobjects_begin(oc);
|
||||
ctx.filter = filter;
|
||||
ctx.initialized = true;
|
||||
|
||||
return 0;
|
||||
try {
|
||||
ctx.iter = ctx.ioctx.nobjects_begin(oc);
|
||||
ctx.filter = filter;
|
||||
ctx.initialized = true;
|
||||
return 0;
|
||||
} catch (const std::system_error& e) {
|
||||
r = -e.code().value();
|
||||
ldpp_dout(dpp, 10) << "nobjects_begin threw " << e.what()
|
||||
<< ", returning " << r << dendl;
|
||||
return r;
|
||||
} catch (const std::exception& e) {
|
||||
ldpp_dout(dpp, 10) << "nobjects_begin threw " << e.what()
|
||||
<< ", returning -5" << dendl;
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
int RGWSI_RADOS::Pool::List::get_next(const DoutPrefixProvider *dpp,
|
||||
|
Loading…
Reference in New Issue
Block a user