> > I'm confused. The initial question was about a PUT to Sync Gateway. But > the answer above is about writing directly to Couchbase Server (using the > go-couchbase library.) Those are very different things. >
Yes, ultimately the question is related to how PUT's to Sync Gateway behave, in terms of blocking behavior with respect to waiting for disk persistence. I was working backwards from the Couchbase Server blocking behavior, since it seems like that would determine the Sync Gateway behavior. > At the Sync Gateway REST API level, if we were to add an option to wait > for persistence it should be implemented as a handler for > /db/_ensure_full_commit, which is the CouchDB equivalent. (The handler > actually exists already but currently does nothing.) > I didn't know about /db/_ensure_full_commit. That sounds similar (but not identical) to what Steven was asking for: it sounded like he wanted (and @Steven please jump in and correct me if I'm wrong), was to be able to configure Sync Gateway such that *every* PUT request blocks until the data is actually persisted to disk, with no extra api calls needed. His concerns focus around application correctness and take priority over performance. Would modifying Sync Gateway to set WriteOptions=Persist achieve this? (I'm not suggesting this is the best way to do it, just want to understand if it would actually achieve the result) -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/CACSSHCHTgCwcRxpQV5-9NjF8QQmpw3t%3DirT9qF9afDr2YG2W6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
