guard_reshard() serves as a wrapper to protect bucket index operations
against concurrent resharding. but it only handles -ERR_BUSY_RESHARDING
if bucket index update is already in progress with bucket shard
assigned, and a concurrent resharding operation deletes this old shard
object, there may be a window of operations targeting the old shards
failing with -ENOENT. this error is not caught anywhere in the calling
functions. as a result we could end up with objects in an inconsistent state.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
}
r = call(bs);
+ if (r == -ENOENT) {
+ ldpp_dout(dpp, 10) << "ENOENT in guard_reshard(), likely bucket resharding, retrying" << dendl;
+ invalidate_bs();
+ continue;
+ }
+
if (r != -ERR_BUSY_RESHARDING) {
break;
}
}
r = call(bs);
+ if (r == -ENOENT) {
+ ldpp_dout(dpp, 10) << "ENOENT in guard_reshard(), likely bucket resharding, retrying" << dendl;
+ continue;
+ }
if (r != -ERR_BUSY_RESHARDING) {
break;
}