I am calling java SDK insert/upsert API’s to insert data. & immediately I am using cluster.query API for querying the same data. but in 90% times I am not getting the inserted record immediately.
if I put pause of 200 ms or more between these two operations. then I am able to get the data for cluster.query.
Tried same approach with async cluster & sync cluster.
I am using
couchbase server : 6.5.1 CE
couchbase java SKD: 3.0.10
@Narayan I’m sure you read the documentation on that topic (Query | Couchbase Docs), but to highlight: by default it is eventually consistent, so you want to set the QueryScanConsistency.REQUEST_PLUS scan consistency on the query options to get “read your own write” semantics.