rgw: object deletion might get bucket index state reset
3 - minor
Pull request ID:
For object put/delete on rgw, it is implemented as multiple phrases:
- put a pending change into bucket index object
- put/delete the object itself
- complete the bucket index pending by either drop it or complete it (depending on step 2).
The bug occurs during failure with either step 2 or step 3, which would left some pending changes on the bucket index, and at a later phrase, when the object is removed, it will check if there is pending change or not (this is on purpose because there could be multiple puts at the same time), and if it is, it would not remove the entry, but rather reset the entry.
For a pending change, we will need to distinguish whether it is an on-going put, or a tombstone from a failure.