N1QL querying the wrong db

We have an app that’s supposed to be querying EU and it’s gathering data from US somehow.

2018-06-04 19:55:36.7140 DEBUG Couchbase.N1QL.QueryClient http://eu-couchbase01:8093/query[“statement”:“select Id, IssueId, Array_Max(StepData).StartTimestamp, WorkflowCompleted from regional where _type=“WorkflowHistory” and FinalStatus is null and Automated=true”,“timeout”:“75000ms”,“client_context_id”:“85::0”]

2018-06-04 19:55:36.7140 TRACE Couchbase.N1QL.QueryClient Sending query cid85::86: http://us-couchbase02:8093/query

Any idea how this is happening? The connection pool should only be hitting EU and I’ve confirmed the IP addresses.

What client you are using. Clients might be sending the different query service in the cluster based on load.

@vsr1 we’re using the .NET SDK

@Kadderin, Client SDKs will root the requests it is not N1QL issue. So changed the category

1 Like

@Kadderin -

The SDK will send N1QL requests to any available node returned by the cluster map that has the query service enabled. If your cluster includes nodes in the EU and US, then any of them could receive a N1QL query.

-Jeff

@jmorris the EU and US clusters are separate in both client configuration and cluster configuration.

There is XDCR setup from US -> EU for some buckets. However the bucket “regional” is not replicated and should only be returning EU documents.

The cluster map for EU is only returning EU nodes

@Kadderin -

The SDK only allows for configuration of one cluster per client and there is no “multi-cluster” awareness built-in (yet for .NET, Java does though). What does your configuration look like? Can you DM me your logs? I am a bit perplexed by this!

-Jeff