Project

General

Profile

Bug #1825

osd loses object deletes by some creates in the same transaction

Added by Greg Farnum almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
OSD
Target version:
Start date:
12/13/2011
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

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

Revision 6c8f60f6 (diff)
Added by Sage Weil almost 8 years ago

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 <>
Signed-off-by: Greg Farnum <>

History

#1 Updated by Sage Weil almost 8 years ago

see wip-osd-maybe-created

#2 Updated by Greg Farnum almost 8 years ago

  • Status changed from New to Testing

Fix looks good; I'm working on tests to verify and check regressions.

#3 Updated by Greg Farnum almost 8 years ago

  • Status changed from Testing to Resolved

Merged to master in 42980922f253ed29718bfac64e17c85cdf9805a6. Still haven't written tests but I have a personal to-do on that...

Also available in: Atom PDF