Use the queue name and project for getting messages

Bug #1207018 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
High
Flavio Percoco

Bug Description

Since the queue name and the project are unique in the queues collection, it is safe to use the queue name and the project for getting messages back from mongodb. It is safe to assume that the queue exists if we get messages back but, in case we don't, it'll raise a DoesNotExist exception.

The transport driver just cares about DoesNotExist regardless it is a queue or a message.

https://github.com/stackforge/marconi/blob/master/marconi/transport/wsgi/messages.py#L88

description: updated
Changed in marconi:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/39736

Changed in marconi:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/39736
Committed: http://github.com/stackforge/marconi/commit/a30092c55e6745268328404a62825e5f9a5d77e7
Submitter: Jenkins
Branch: master

commit a30092c55e6745268328404a62825e5f9a5d77e7
Author: Flaper Fesp <email address hidden>
Date: Thu Aug 1 17:22:42 2013 +0200

    Use queue's name and project to get messages

    Mongodb's driver currently queries the queue's collection to get queue
    id and then filter messages with it. Instead of storing the id, this
    patches stores the queue name and the project in the message collection
    and use that for querying messages.

    It's safe to assume that the queue exists when messages are returned by
    the query, however, posts operation will still verify queue's existence.

    Fixes bug: #1207018

    Change-Id: Iaa7bc3f1300b3349a5cfad5a9f6ecabb2f75e95e

Changed in marconi:
status: In Progress → Fix Committed
Changed in marconi:
milestone: none → havana-3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.