Skip to content

Commit 8f604ea

Browse files
committed
rgw: BucketTrimShardCollectCR expect ENODATA as empty
RGWRadosBILogTrimCR() returns ENODATA when nothing is found: ``` 4 trim: failed to trim bilog shard: (61) No data available ``` Signed-off-by: Seena Fallah <[email protected]>
1 parent 21f67af commit 8f604ea

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/rgw/driver/rados/rgw_trim_bilog.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class BucketTrimShardCollectCR : public RGWShardCollectCR {
367367
size_t i{0}; //< index of current shard marker
368368

369369
int handle_result(int r) override {
370-
if (r == -ENOENT) { // ENOENT is not a fatal error
370+
if (r == -ENODATA) { // ENODATA is not a fatal error
371371
return 0;
372372
}
373373
if (r < 0) {
@@ -791,10 +791,6 @@ int BucketTrimInstanceCR::operate(const DoutPrefixProvider *dpp)
791791
set_status("trimming bilog shards");
792792
yield call(new BucketTrimShardCollectCR(dpp, store, *pbucket_info, totrim.layout.in_index,
793793
min_markers));
794-
// ENODATA just means there were no keys to trim
795-
if (retcode == -ENODATA) {
796-
retcode = 0;
797-
}
798794
if (retcode < 0) {
799795
ldpp_dout(dpp, 4) << "failed to trim bilog shards: "
800796
<< cpp_strerror(retcode) << dendl;

0 commit comments

Comments
 (0)