PATCH claim not resetting age

Bug #1210662 reported by Amit Gandhi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Critical
Flavio Percoco

Bug Description

When PATCHing a claimed message with a new TTL, the age is not reset. The new TTL is expressed.

Expected Behavior: Age of the message should be reset to 0 when the message is PATCHed.

Kurt Griffiths (kgriffs)
Changed in marconi:
importance: Undecided → Critical
milestone: none → havana-3
Revision history for this message
Zhihao Yuan (zyuan) wrote :

Currently the age always reflect the time lived regarding to the creation time (I think this is a better approach, although it's different from spec). Clean up only needs to compare the TTL and the current time, it's not an issue.

Revision history for this message
Amit Gandhi (amit-gandhi) wrote :

so if the TTL is currently 100, and i need to extend it by 50, must I set the TTL to 150 (existing 100, plus another 50) ???

If thats the case, then the spec needs to be updated to reflect that.

Revision history for this message
Kurt Griffiths (kgriffs) wrote :

Let's modify the mongo driver to be consistent with the spec and sqlite driver, per chat in IRC.

Changed in marconi:
assignee: nobody → Flavio Percoco (flaper87)
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/41939

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/41939
Committed: http://github.com/stackforge/marconi/commit/055a43777b2f4d5bb78f1a9fea6f952ffb3087c7
Submitter: Jenkins
Branch: master

commit 055a43777b2f4d5bb78f1a9fea6f952ffb3087c7
Author: Flaper Fesp <email address hidden>
Date: Wed Aug 14 16:39:50 2013 +0200

    Don't use claim creation time to calc claim's age

    Mongodb's driver uses Claim's creation time to estimate claims age
    instead, it should use claim's update time. Since there's no update /
    creation time in mongodb's claims, the patch estimates claims age by
    doing:

        delta(expiration - ttl, now)

    This change fixes the issue bellow and makes mongodb's claims compliant
    with Marconi's specs.

    Change-Id: I72c968236ecd239e7b885b293238e2920807a57c
    Closes-Bug: #1210662

Changed in marconi:
status: In Progress → Fix Committed
Changed in marconi:
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.