Difference between revisions of "Zaqar/specs/storage/mongodb"
< Zaqar
(Created page with "== MongoDB Storage Driver - Marconi == Implementation notes regarding Marconi's official MongoDB storage driver. === Claims === ==== Sequence A ==== #. Message 1 (M1) has ...") |
m (Malini moved page Marconi/specs/storage/mongodb to Zaqar/specs/storage/mongodb: Project Rename) |
(No difference)
|
Latest revision as of 18:42, 7 August 2014
Contents
MongoDB Storage Driver - Marconi
Implementation notes regarding Marconi's official MongoDB storage driver.
Claims
Sequence A
- . Message 1 (M1) has a claim on it that has expired, and is returned by active().
- . claim() attempts to update([M1]) and succeeds because, although "c" exists, it has expired.
Sequence B
- . Message 1 (M1) has a claim on it that has expired, and is returned by active().
- . Another request comes in and also gets [M1] from active()
- . One of the requests "wins" and executes update([M1]) first, succeeding because, although "c" exists, it has expired.
- . The remaining request executes update([M1]) but M1 now exists and IS NOT expired, so updated < limit, which is acceptable.
Sequence C
- . Message 1 (M1) has no claim associated with it, and is returned by active().
- . claim() attempts to update([M1]) and succeeds because "c" does not exist
Sequence D
- . Message 1 (M1) has no claim associated with it, and is returned by active().
- . Another request comes in and also gets [M1] from active()
- . One of the requests "wins" and executes update([M1]) first, succeeding because "c" does not exist
- . The remaining request executes update([M1]) but M1 now exists and IS NOT expired, so updated < limit, which is acceptable.
Sequence E
- . Message 1 (M1) has no claim associated with it, and is returned by active().
- . Another request comes in and also gets [M1] from active()
- . One of the requests "wins" and executes update([M1]) first, succeeding because "c" does not exist
- . The new "c" expires (winning client takes too long to process M1 or crashes)
- . Client attempts to delete M1 using "c" but get's an error because "c" has expired, so client rolls back the work it did for M1
- . The remaining request executes update([M1]) but M1 now exists and is expired, so that request gets the claim on M1