I just read up on the difference between statement_plus (or at_plus) and request_plus. As far as I understand it, you have to specify the mutations your query should wait for, i.e.
JsonDocument written = bucket.upsert(JsonDocument.create("mydoc", JsonObject.empty())); bucket.query( N1qlQuery.simple("select count(*) as cnt from `travel-sample`", N1qlParams.build().consistentWith(written)) );
Does this work in a distributed microservice architecture? If I cannot be sure if another instance of a service is doing queries on the same kind of documents, how can I specify what to wait for?
On an unrelated note: can somebody tell me how spring-data-couchbase handles READ_YOUR_OWN_WRITES? It is their default consistency level but I don’t see a way to specify the
MutationToken. The statement
consistentWith does not even occur in their code base.