Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couchbase: session registry creates new cluster client per bucket #1676

Closed
ennru opened this issue May 3, 2019 · 1 comment
Closed

Couchbase: session registry creates new cluster client per bucket #1676

ennru opened this issue May 3, 2019 · 1 comment

Comments

@ennru
Copy link
Member

ennru commented May 3, 2019

Versions used

Alpakka Couchbase: 1.0.0

Expected Behavior

When creating a CouchbaseSession (eg. via CouchbaseSessionRegistry) the underlying AsyncCluster should be shared when using different buckets on the same cluster.

Actual Behavior

The CouchbaseSession internally creates a new AsyncCluster instance for every bucket which is very heavy-weight.

https://github.com/akka/alpakka/blob/v1.0.0/couchbase/src/main/scala/akka/stream/alpakka/couchbase/scaladsl/CouchbaseSession.scala#L36-L42

Work-around

By creating the Bucket in user code, full control over the AsyncCluster is available.

CouchbaseSession contains methods to create Akka Streams directly.

See Using CouchbaseSession directly

@ennru
Copy link
Member Author

ennru commented May 6, 2019

Fixed with #1677

@ennru ennru closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant