On Nov 18, 2012, at 4:12 PM, Pulkit Singhal <pulkitsing...@gmail.com> wrote:
> I have a scenario where just like GrocerySync, you can checkuncheck items from lists.
> If I do this too fast then I get back an op.error saying:
> The operation couldn't be completed. Conflict
> That's fair, I guess ... but now I wonder what should I do about it.
A common way to handle a conflict is to read the new revision of the document, reapply your change, and (if the change isn’t now a no-op) retry the PUT. That sounds like the appropriate thing in this case.
I’ve meant to add some support for this to CouchModel, but haven’t had a chance yet.
> Does it make sense to lock up the entire table view until a successful response comes back?
> May be just lock-up that table row or that checkmark toggling control?
That will fix the common case, but it won’t help if the conflict is with an incoming pull replication, since that doesn’t go through the UI.
—Jens