On Mon, Aug 22, 2011 at 02:03, Jason Smith <[email protected]> wrote:
> On Mon, Aug 22, 2011 at 12:04 PM, Ryan Ramage <[email protected]> > wrote: > > How to I grant mega points for a fantastic answer? Thanks Jason. > > > > A summary from the link....I have a master couchapp that clients pull > > replicate from. A refactoring of the couchapp may mess up the rev number > for > > the main design doc. So i need a way to go past the rev number to force > an > > update to the clients. Is there a better way? > > Maybe a few ideas? > Here's another nasty way to trick CouchDB, just for fun: PUT the new version of the document with whatever _rev you want and put ?new_edits=false in the query string. Couch will accept the new revision no matter what. Replication uses this feature to bypass the conflict rejections and merge conflicting trees. Choose whatever number you feel like and abuse the definition of "winning" revision so your newest one is what shows up :). You should still DELETE the old revisions or you'll proliferate conflicts and that puts unnecessary burden on couch in some places. -Randall
