Hi,

Does this apply also to design documents? because I get a 409 when I try to 
update with a PUT my design document, I get this error in the device log:

03-31 11:34:59.956 I/CBLite  (12734): 
Acme.Utils.ThreadPool(1)-PooledThread: 
Acme.Serve.Serve$ServeConnection@1948b441 Begin transaction (level 1)
03-31 11:34:59.958 I/CBLite  (12734): 
Acme.Utils.ThreadPool(1)-PooledThread: 
Acme.Serve.Serve$ServeConnection@1948b441 CANCEL transaction (level 1)
03-31 11:34:59.958 W/System.err(12734): 
com.couchbase.lite.CouchbaseLiteException: The current winning revision is 
not deleted, so this is a conflict
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.Database.putRevision(Database.java:3578)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.Database.putRevision(Database.java:3465)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.router.Router.update(Router.java:1508)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.router.Router.update(Router.java:1544)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.router.Router.do_PUT_Document(Router.java:1579)
03-31 11:34:59.959 W/System.err(12734): at 
java.lang.reflect.Method.invoke(Native Method)
03-31 11:34:59.959 W/System.err(12734): at 
java.lang.reflect.Method.invoke(Method.java:372)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.router.Router.start(Router.java:466)
03-31 11:34:59.959 W/System.err(12734): at 
com.couchbase.lite.listener.LiteServlet.service(LiteServlet.java:128)
03-31 11:34:59.959 W/System.err(12734): at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
03-31 11:34:59.959 W/System.err(12734): at 
Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2251)
03-31 11:34:59.959 W/System.err(12734): at 
Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2176)
03-31 11:34:59.959 W/System.err(12734): at 
Acme.Serve.Serve$ServeConnection.run(Serve.java:1988)
03-31 11:34:59.959 W/System.err(12734): at 
Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1223)
03-31 11:34:59.959 W/System.err(12734): at 
java.lang.Thread.run(Thread.java:818)
03-31 11:34:59.962 E/Router  (12734): Error updating doc: _design/products


But in the docs 
<http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/design-document/put---db--_design--design-doc-/index.html>
 
there is no _rev parameter at all...

Best regards.
Jaime

El viernes, 27 de junio de 2014, 18:22:46 (UTC+2), Jens Alfke escribió:
>
>
> On Jun 27, 2014, at 6:36 AM, [email protected] <javascript:> wrote:
>
> but when I put again with 
> ...
> data: JSON.stringify({title: 'My doc 2 update', type: 'mydoc'})
> ...
> i get response error: 409 (Conflict) 
>
>
> Yes, that’s due to multi-version concurrency control (MVCC). When you 
> update a doc you have to provide the revision ID (_revid) of the version 
> you’re replacing, to guard against race conditions. Please see the docs.
>
> —Jens
>

-- 
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/2e8020af-3dda-415a-9877-9a0b5f485058%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to