Closed Bug 739831 Opened 12 years ago Closed 12 years ago

Implement If-Unmodified-Since checking with a single database query

Categories

(Cloud Services Graveyard :: Server: Sync, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: rfkelly, Unassigned)

Details

(Whiteboard: [sync-scale][qa-])

If-Unmodified-Since checking is currently implemented by looking up the record with one query, checking the timestamp at the python level, then issuing the write as a second query.  Not only is this inefficient, it opens a small race condition if two clients are attempting to edit the same resource.

It should be possible to implement this as a single query by using "WHERE modified = <last-modified>" and then checking how many rows were successfully updated.
Whiteboard: [sync-scale] → [sync-scale][qa-]
Per Bug 764214 we have decided not to push if-unmodified-since handling down into the storage layer, meaning that we can't really implement this optimization.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
OK. Marking this as Verified.
Status: RESOLVED → VERIFIED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.