Giter VIP home page Giter VIP logo

Comments (5)

matlockx avatar matlockx commented on August 29, 2024

by @krasserm:
"I think keyspace and table creation should be done by a singleton that journal actors delegate to during initialization, so that these things can be executed sequentially. Journals would need to support asynchronous initialization then."

from akka-persistence-cassandra.

matlockx avatar matlockx commented on August 29, 2024

@krasserm How do you do that in an akka cluster? I can think of a situation where two nodes are spawning actors with different configs causing the same concurrent schema creation problem. Or is this unrealistic? Then we need to think of a cluster singleton, right?

I think it is still valid (though some kind of dirty) to do the schema/table creation task in a try/catch block and retry it because we have everywhere the 'if exists' statements. That hopefully should ship around the problem (also in an akka cluster) and would also fit to the proposed singleton extraction.

from akka-persistence-cassandra.

patriknw avatar patriknw commented on August 29, 2024

+1 for retrying (a few times)

from akka-persistence-cassandra.

krasserm avatar krasserm commented on August 29, 2024

Right, I was just considering the case where we have n journal instances in the same ActorSystem. In a cluster setup, retrying is a much simpler solution. Here's my +1.

from akka-persistence-cassandra.

patriknw avatar patriknw commented on August 29, 2024

Continued here: akka/akka-persistence-cassandra#4

from akka-persistence-cassandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.