The reason for this bug to occur is actually quite simple and I believe
is Desktopcouch fault and has no relation what so ever with CouchDb. Let
me explain my statement:
The delete method in the Desktopcouch library is the following:
def delete_record(self, record_id):
"""Delete record with given id"""
record = self.with_reconnects(self.db.__getitem__, record_id) record.setdefault('application_annotations', {}).setdefault(
'Ubuntu One',
{}).setdefault('private_application_annotations', {})[ 'deleted'] = True self.with_reconnects(self.db.__setitem__, record_id, record)
as you can see in the method the document is actually not deleted from
the database but marked as deleted instead. When you executed the given
test code you are trying to update your document with the same id and an
old rev. This is actually a feature used in the server side. I believe
this behavior is easy to solve in two different ways:
1. Ensure that you do not reuse your ids.
2. Add extra logic to the desktopcouch lib to solve the issue.
The bug has been triaged, but if it gets reopened I'm more than happy to
become the owner and provide a solution :D
Kr,
Manuel
"""Delete record with given id"""
357
153.1.1
record = self.with_reconnects(self.db.__getitem__, record_id)
358
2
record.setdefault('application_annotations', {}).setdefault(
359
On Wed, 2010-06-30 at 19:05 +0000, Omer Akram wrote:
> gwibber is also infected by this bug. so is it something the app should
> deal with or it can be fixed in desktopcouch?
>
Hello,
The reason for this bug to occur is actually quite simple and I believe
is Desktopcouch fault and has no relation what so ever with CouchDb. Let
me explain my statement:
The delete method in the Desktopcouch library is the following:
def delete_record(self, record_id): reconnects( self.db. __getitem_ _, record_id)
record. setdefault( 'application_ annotations' , {}).setdefault( 'private_ application_ annotations' , {})[
'deleted' ] = True
self.with_ reconnects( self.db. __setitem_ _, record_id, record)
"""Delete record with given id"""
record = self.with_
'Ubuntu One',
{}).setdefault(
as you can see in the method the document is actually not deleted from
the database but marked as deleted instead. When you executed the given
test code you are trying to update your document with the same id and an
old rev. This is actually a feature used in the server side. I believe
this behavior is easy to solve in two different ways:
1. Ensure that you do not reuse your ids.
2. Add extra logic to the desktopcouch lib to solve the issue.
The bug has been triaged, but if it gets reopened I'm more than happy to
become the owner and provide a solution :D
Kr,
Manuel
"""Delete record with given id""" reconnects( self.db. __getitem_ _, record_id) setdefault( 'application_ annotations' , {}).setdefault(
357
153.1.1
record = self.with_
358
2
record.
359
'Ubuntu One', {}).setdefault( 'private_ application_ annotations' , {})[
360
'deleted'] = True reconnects( self.db. __setitem_ _, record_id, record)
361
153.1.1
self.with_
On Wed, 2010-06-30 at 19:05 +0000, Omer Akram wrote:
> gwibber is also infected by this bug. so is it something the app should
> deal with or it can be fixed in desktopcouch?
>