info memcache and env chaching

Bug #1162199 reported by David Hadas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
David Hadas

Bug Description

The current implementation includes three ways to get info of a container and three of an account; direct calls, get_info at the controller and get_info that is used by middleware.

Apart from plenty of code duplicates (e.g HEAD reimplemented to resolve info when info is missing from cache), the six variances differ from each other in the way they use memcache and the env[cache_key] this for example results in different cases where caching is not used as it should.

Work is needed to implement:
1. a single code path for get_info (remove duplicated code)
2. a single path for approaching the account and container server to do a GETorHEAD (remove duplicated code)
3. Document the way get_info should be used and Deprecate the old interfaces

Once done, further work will be needed to bubble the change up the leader (to remove the old deprecated interfaces from controller_base by using the new interfaces in the controllers, middleware and test code) - this is left for a next phase.

Changed in swift:
assignee: nobody → David Hadas (david-hadas)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

Changed in swift:
status: New → In Progress
Changed in swift:
assignee: David Hadas (david-hadas) → nobody
description: updated
description: updated
description: updated
Changed in swift:
assignee: nobody → David Hadas (david-hadas)
Changed in swift:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/30481
Committed: http://github.com/openstack/swift/commit/58f4e0f2e03b807c0b73073f4767fc441bcf810b
Submitter: Jenkins
Branch: master

commit 58f4e0f2e03b807c0b73073f4767fc441bcf810b
Author: David Hadas <email address hidden>
Date: Sat Mar 30 15:55:29 2013 +0300

    get_info - removes duplicate code (Take 3)

    Consolidate the different ways in which info of account/container
    is gathered, cached, used, updated, etc.

    This refactoring increases code reuse and is a basis for later
    addition of account ACLs.
    Changing the get_info users is left for future.
    This staged approach ensures the behaviour is unchanged.

    Change-Id: I67b58030d3f9e3bc86bcd7ece0f1dc693c4e08c3
    Fixes: Bug #1162199

Changed in swift:
status: In Progress → Fix Committed
Changed in swift:
milestone: none → 1.9.0
Thierry Carrez (ttx)
Changed in swift:
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.