Comment 4 for bug 1216950

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/44340
Committed: http://github.com/stackforge/marconi/commit/72974b7be1ed66476ab7027bb5b3eb6c9c3e2340
Submitter: Jenkins
Branch: master

commit 72974b7be1ed66476ab7027bb5b3eb6c9c3e2340
Author: kgriffs <email address hidden>
Date: Wed Aug 28 20:30:08 2013 -0500

    fix: Requests get slower when queues have a lot of messages

    The primary culprit was an additional scan operation
    in the MongoDB driver's _list(...) method, triggered by
    a range query on the message's expiration date.

    This patch removes that field from the index, so the filtering
    is done using a single scan pass. It also removes 'e' from the
    index used for counting messages, since in testing it was
    slightly faster to leave it out (and should also slightly speed
    up insertion time since it's once less index field that mongo
    has to worry about.)

    Also in this patch, the order of the project and
    queue name fields were swapped in the index in order
    to optimize for selectivity. In addition, some minor
    edits were made for style and correctness.

    Finally, this patch also removes thresholding from
    the GC so that we don't have expired messages hanging
    around for a long time that have to be filtered out.

    Change-Id: Ie4bd125e966612f4a8022fd6af133314d05fe428
    Closes-Bug: #1216950