Skip to content

ViewDefinition.sync_many silences and ignores conflicts` #183

Closed
@djc

Description

@djc

From wickedg...@gmail.com on May 25, 2011 10:25:50

If a conflict in a design doc is introduced by starting two processes at the same time that make calls similar to:

x.py:
couchdb.design.ViewDefinition('foo', 'xxx', '...', reduce=None).sync(db)

y.py:
couchdb.design.ViewDefinition('foo', 'yyy', '...', reduce=None).sync(db)

Only one of xxx or yyy will be present in the design doc (ssuming the race condition triggers). https://code.google.com/p/couchdb-python/source/browse/couchdb/design.py line 200 has:

    db.update(docs)

Which doesn't check the return for success. It should have something like:

for (success, _id, _rev) in db.update(docs):
if not success:
raise _rev # it's actually an exception

Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=183

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions