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
Spawning entities fails continually with JournalFailureException when PreparedStatement initialization fails #103
Comments
@danischroeter @nvollmar I did some investigation of the history of why the lazy vals were introduced in CassandraJournal and the 2 of you were involved in the changes. (akka/akka-persistence-cassandra#816) It seems that we need retry when the |
The solution would be pretty easy then, i.e. change to |
@mdedetrich the problem code used defs but were changed to lazy vals to fix issues - see the conversation in akka/akka-persistence-cassandra#816. We may be better off trying to introduce code that recovers from failure than reverting to defs. But it's worth considering both approaches. |
I'm going to press on with the 1.0.0 release and add this as a known issue in the release notes. Hopefully, we should be able to release a patch in the next few weeks that fixes this issue. |
@pjfanning |
According to the conversation in akka/akka-persistence-cassandra#816, we should also change |
@negokaz LazyFutureEval is designed to fix the issue where a |
scala:
2.13.12
pekko:
1.0.1
pekko-persistence-cassandra:
0.0.0-1120-5b7555fe-SNAPSHOT
CassandraJournal
cachesFuture[PreparedStatement]
withlazy val
.It caches failed
Future[PreparedStatement]
when PreparedStatement initialization fails.https://github.com/apache/incubator-pekko-persistence-cassandra/blob/7741ba0ab3be3ab0c132dcfc866d14c25e2c08de/core/src/main/scala/org/apache/pekko/persistence/cassandra/journal/CassandraJournal.scala#L117-L152
The failure can occur when the app starts where Cassandra or the network is unstable.
The broken cache makes it fail to read events from the Journal continually.
We can reproduce the problem with the following sample project.
The text was updated successfully, but these errors were encountered: