zaqar/marconi
kgriffs fc71f6a17e fix(mongodb): Ensure batch message posts are atomic (all or nothing)
In the case of a network failure it is not possible to discover which,
if any, of the messages in a given batch were inserted before the
outage occurred.

This patch works around the problem by inserting messages in two
phases:

1. Assign all messages a "batch" or "group" ID and insert them
2. Once it has been confirmed that *all* messages were inserted
   correctly, finalize the transaction by clearing the batch
   ID, 'g', from the messages just inserted.

Message listing and counting were also modified to ignore any
non-finalized messages, i.e., those messages that have a non-null
'g' value.

Orphaned messages will eventually expire and be cleaned up as
usual via the TTL index.

Closes-Bug: #1270263
Change-Id: I9de61cdfdf6dfcbe07ef76bf63a293091f087663
2014-01-17 22:42:09 +00:00
..
cmd fix(bootstrap): Logging CLI options don't work 2013-10-17 10:33:17 -05:00
common Added a request and response file to common 2014-01-08 10:24:54 -06:00
openstack Update openstack/common/lockutils 2013-11-14 21:21:05 +11:00
queues fix(mongodb): Ensure batch message posts are atomic (all or nothing) 2014-01-17 22:42:09 +00:00
tests Merge "Verify response jsonschema for List Messages by ID" 2014-01-08 10:12:43 +00:00
__init__.py Remove the __MARCONI_SETUP_ global from init 2013-12-09 17:41:29 +01:00
version.py Follow hacking rules about import 2013-10-11 20:06:35 -07:00