Description
Problem
It seems like that under a spring boot transaction the query (like Count) is not being sent with the correct query context.
Background
A user is trying to do the following under a spring boot transaction:
Which is equivalent to
SELECT COUNT(*) AS count FROM workspace WHERE _class` = "XXX”
the query has a context of A bucket and a scope.
This Count query fails due to the following:
org.springframework.data.couchbase.transaction.error.TransactionSystemUnambiguousException: Transaction has failed with cause 'java.lang.RuntimeException: com.couchbase.client.core.error.IndexFailureException: The server reported an issue with the underlying index {"completed":true,"coreId":"0xd8ace85f00000001","errors":[{"code":12003,"message":"Keyspace not found in CB datastore: default:workspace - cause: No bucket named workspace","retry":false}],"httpStatus":500,"idempotent":false,"lastDispatchedFrom":"127.0.0.1:49332","lastDispatchedTo":"127.0.0.1:8093","requestId":1119,"requestType":"QueryRequest","retried":0,"service":{"operationId":"null","statement":"SELECT COUNT(\"*\") AS
countFROM
workspaceWHERE
_class = \"XXX\"","target":"NodeIdentifier{address=[127.0.0.1](https://protect-usb.mimecast.com/s/EVu1CEKLvRhl1Z4yiwXFJN?domain=secure-web.cisco.com), managerPort=8091}","type":"query"},"timeoutMs":75000,"timings":{"dispatchMicros":76129,"totalDispatchMicros":76129,"totalMicros":97953}}'
The bucket name in this case was "designer-dev" and the scope was workspace. Collection also names workspace.