N1QL query is failing in a bucket replica with timeout exception

Hi,

I am trying to fetch a data based on Id from a bucket’s replica via service. This service works fine for all the data which is present in the parent bucket but when the same service is called based on Id which is present only in the replica, it fails with TimeOutException. Can you please let me know what might be the issue?

Thanks,
Arunendu

I will be very grateful if you take this issue on priority basis.

Thanks,
Arunendu Ravi

What is your query? How are you issuing N1QL query on replica service.

Hi vsr1,

It’s not replica service rather it’s bucket’s replica. I have created a replication of an existing bucket and there are few REST services which works only on bucket’s replica. So all the services which does not uses N1QL queries to interact with bucket works fine but those which uses N1QL queries goes through following 2 scenarios :-

  1. Data which is exclusive to bucket replica fails (GET service via ID) with timeout exception irrespective of the fact that I increased the timeout to 17000 ms(that too with index).
  2. Data which is present both in Main and replica bucket works perfectly fine (GET service via ID) even with the default timeout configuration.

Kindly do let me know why there is a difference in the behaviour. Ideally if the bucket used to execute N1QL queries is of replica bucket then it should work fine no matter the data is exclusive to a bucket or not.

N1QL only works on master bucket data. N1QL reading from replica is not supported. MB-34717. If you need that use SDKs directly get from Dtata Service.

thanks vsr1 for reply.

I checked the link which you shared that has the solution only for GoSDK not for JavaSDK.
The following comment given by Keshav :-

"The replica-reads are supported in Couchbase and even SDK supports it as well.

https://docs.couchbase.com/go-sdk/1.5/failure-considerations.html#devguide-replica-read

Some customers have asked for this as well.

In addition, we need a way to gracefully shutdown the query service."

Kindly share a link if any.

Thanks,
Arunendu

Thanks for the support vsr1