"ResourceConflict: Document update conflict" during /contacts/ view

Bug #545321 reported by Roman Yepishev
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Fix Released
High
Eric Casteleijn

Bug Description

<thisfred> self.db[foo] = bar
 modifies bar (!)
 it adds the revision number

Module /srv/ubuntuone.com/production/ubunet-rev-2475/utilities/../lib/couchdb/client.py, line 910, in _request
    raise ResourceConflict(error)
  Module /srv/ubuntuone.com/production/ubunet-rev-2475/utilities/../lib/couchdb/client.py, line 867, in put
    **params)
  Module /srv/ubuntuone.com/production/ubunet-rev-2475/utilities/../lib/couchdb/client.py, line 302, in __setitem__
    resp, data = self.resource.put(id, content=content)
  Module /srv/ubuntuone.com/production/ubunet-rev-2475/utilities/../lib/ubuntuone/cloud_server/server.py, line 400, in ensure_design_document
    self.db[full_id] = uptodate

Roman Yepishev (rye)
visibility: private → public
Revision history for this message
Eric Casteleijn (thisfred) wrote :

The problem was that ensure_design_document has a default keyword argument that is a function call. The function call is only evaluated once at import time, whereas we need it to be evaluated every time, to prevent couchd-python to write revision numbers back into the (in memory copy of the) view registry. Hate.

Changed in ubuntuone-servers:
assignee: nobody → Eric Casteleijn (thisfred)
importance: Undecided → High
status: New → In Progress
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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