further precache work

Bug #388798 reported by Stuart Bishop
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Stuart Bishop

Bug Description

The Storm precache work in lib/canonical/launchpad/components/precache.py is incomplete:

 - It needs to move to a better location. canonical.launchpad.database.storm.py, or lp.services.database. lazr.database was suggested, but I see this more as a Launchpad specific work around so don't think the lazr namespace is appropriate.

 - It might be better named prejoin, which is the name of the SQLObject feature. I got confused when picking the name.

 - It needs tests.
  - We need to test that the PrejoinResultSet returns identical results to the unwrapped ResultSet for all the implemented methods.
  - We need to test that it does what it is supposed to. Try issuing a query, killing the database connection so it will not reconnect, and accessing the attributes that should be in the cache.

Related branches

Stuart Bishop (stub)
Changed in launchpad-foundations:
assignee: nobody → Stuart Bishop (stub)
milestone: none → 2.2.6
status: New → Triaged
Revision history for this message
Stuart Bishop (stub) wrote :

Reverting edge and cleaning the production data is impractical.

I'll suggest downloading latest pytz (http://pypi.python.org/packages/source/p/pytz/pytz-2009j.tar.bz2) and installing on all the appservers:

mkdir -p /srv/staging.launchpad.net/lib/python
export PYTHONPATH=/srv/staging.launchpad.net/lib/python
python2.4 setup.py install --home=/srv/staging.launchpad.net

Then startup the appservers so they start with PYTHONPATH set to /srv/staging.launchpad.net/lib/python.

Revision history for this message
Stuart Bishop (stub) wrote :

Wrong bug :-P

Stuart Bishop (stub)
Changed in launchpad-foundations:
milestone: 2.2.6 → 2.2.7
Stuart Bishop (stub)
Changed in launchpad-foundations:
importance: Undecided → Medium
status: Triaged → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in db r8221.

Changed in launchpad-foundations:
status: In Progress → Fix Committed
Stuart Bishop (stub)
Changed in launchpad-foundations:
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.