I tried updating bulk documents using the n1ql update query. The issue I have faced was that only a subset of documents was getting updated in the first try, a little more in the second try and so on without change the condition in WHERE part. Is this a bug in couchbase server or a limit on the number of documents getting updated in one single query. I am using couchbase version
Enterprise Edition 5.1.0 build 5552.
I did not get any error, I got usual response i.e. empty array after executing the update query.
QUERY: Update bucket_name SET channel=[âvalueâ]
where companyId = âvalue2â
AND locationId = âvalue3â" AND Meta(bucket_name).id NOT LIKE â%_sync%â
Index Definition: I did not specifically had an index for this query, because I was not concerned with latency, I wanted to execute a backward migration script in background.
Can you tell why partial mutations without creating index, from my understanding indexing is used to avoid latency? And one more thing I tried now without indexing on query workbench it worked fine, sometimes it causes partial mutations, and sometimes it works as excpected.
Without index it might use primary index. get all documents and apply filters and discard entries.
Lot of unnecessary work. Also check any timeout . Any index is eventual consistent if index is not up to date on mutations those might not updated.
index is not up to date - how to ensure the index is up to date, do primary index not get update ?
Also check any timeout - what is the problem in timeout, and I do have any timeout, you are basically referring timeout as âexecute the query after fixed millisecondâ?
Couchbase index are eventual consistence. If you want you use scan_consistency (check documentation).
While executing query user can set timeout. status of query gives if any tieout.
I think I will have to read the documentation as there is a gap in my knowledge, so then I should proceed further with the discussion, but I got an overview. Thanks for helping out.