Bug #1825
osd loses object deletes by some creates in the same transaction
0%
Description
We found a missing object in alexandria, caused by the gateway trying to delete an object that seems to not actually exist. RGW deletes actually come in a transaction of (setxattr, setxattr, delete), so if the object doesn't exist before it can get created by this delete op!
The OSDs should be able to handle this, but because the object doesn't exist before the transaction and the setxattr silently creates the object (it doesn't know whether it existed before or not), we're running into some trouble. It revolves mostly around those code paths which set maybe_created, and how that doesn't seem to translate into new_obs->exists.
Sam suggested that I could try just replacing maybe_created with exists = true, although I suspect there's a reason we don't do that already...come up with a safe fix and implement!
Associated revisions
osd: simplify creation logic in do_osd_ops
Drop the maybe_created variable, and track exists over the course of the
transaction.
Fixes: #1825
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
History
#1 Updated by Sage Weil almost 12 years ago
see wip-osd-maybe-created
#2 Updated by Greg Farnum almost 12 years ago
- Status changed from New to 7
Fix looks good; I'm working on tests to verify and check regressions.
#3 Updated by Greg Farnum almost 12 years ago
- Status changed from 7 to Resolved
Merged to master in 42980922f253ed29718bfac64e17c85cdf9805a6. Still haven't written tests but I have a personal to-do on that...