CouchDB bulk update won't create document if needed -
i optimizing script wrote last year reads documents source couch db, modified doc , writes new doc destination couch db.
so previous version of script did following 1.read document source db 2.modify document 3.writes doc destination db
what i'm trying pile docs write in list , write bulk of (let's 100) destination db optimize perfomances.
what found out when bulk upload has write list of docs destination db if there doc in list has "_id" not exist destination db, document won't written.
the return value have "success: true" if after copy happened there no such doc in destination db.
i tried disabling "delayed_commits" , using flag "all_or_nothing" nothing has changed. cannot find info on stackoverflow / documentation i'm quite lost.
thanks
to future generations: experiencing known bug , should fixed in next release.
https://issues.apache.org/jira/browse/couchdb-1415
the actual workaround write document slighty different each time. added useless field called "timestamp" has value timestamp of when run script.
Comments
Post a Comment