A summary of what I am trying to do:
We have multiple tenants connecting to our sync gateway.
As we have never worked out how to apply multi tenancy, we have ended up creating new buckets for each tenant. This is obviously very wasteful memory wise.
We have tasked ourselves to come up with a way of creating multiple gateways (databases in sync speak, not services) getting filtered documents based on a property, (api or tenantid eg), and expose them through the same gateway.
We realized that you can’t create a sync gateway pointing to the same collection, so I have created a collection under the _default scope called othercollection.
This gives me the following schema: maindata._default.othercollection on the Couchbase server.
I then try and create a gateway that should only expose that collection:
But I get a 500 error: Keyspace not found in CB datastore: default:maindata._default.othercollection
This must be right, as if I change the collection to _default, it fails with the error that another gateway is using this namespace.
To reduce possible issues, my service user (serviceconfig.json) bootstraps and connects as Full Admin.
I have really tried everything, and have no choice but to reach out.