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

Configured Cassandra consistency level not used for offsets and read sides #3206

Open
johanandren opened this issue Mar 15, 2021 · 0 comments

Comments

@johanandren
Copy link
Contributor

Akka Persistence Cassandra plugin up to 0.104 (because of the underlying Cassandra client) requires explicit programmatic set of consistency levels on each PreparedStatement.

The read side offset tracking in https://github.com/lagom/lagom/blob/master/persistence-cassandra/core/src/main/scala/com/lightbend/lagom/internal/persistence/cassandra/CassandraOffsetStore.scala however does do that and instead will get the default consistency of the client (the C* client API docs says ONE ). A client default is not configurable with the versions of the client/APC used in Lagom (the version used in APC 1.0.0 and later does though).

Note that the read, using session.selectOne, does automatically pick up the read consistency configured for APC, so only the offset write and any other manually created PreparedStatements needs a fix.

Additionally the docs and samples should probably mention the need to set consistency level on user writes to Cassandra in the read side processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant