Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    matthiassig12
    @matthiassig12
    adding an explicit dependency to persistence query solved the issue, thanks for helping out!
    Sergey-Belebnev
    @Sergey-Belebnev
    Hello! We're faced with akka-persistence-jdbc plugin problem while recovering snapshot from Oracle DB.
    Our snapshot size about 400MB, but process of recovering uses about 8GB of memory (more then 90% usage is scala.collection.immutable.Stream$Cons).
    Is it expected behavior?
    Thanks
    Ruud Welling
    @WellingR
    Hey @Sergey-Belebnev recently a user has submitted a PR to fix this issue, the resason is that all the snapshots are retrieved from the database isntead of only the latest one, see dnvriend/akka-persistence-jdbc#215
    If this PR is completed, I will make sure a release will be made as soon as possible
    Sergey-Belebnev
    @Sergey-Belebnev
    @WellingR
    Thanks for answer!
    But we faced with described problem with single snapshot in oracle. So have you any another thoughts why snapshot recovering use so much memory?
    Thanks!
    Renato Cavalcanti
    @renatocaval
    @Sergey-Belebnev, are you sure this is only due to snapshot recovering?
    in which interval are you saving snapshots? From what you tell, either your model has not much traffic and you have only one snapshot or it's saving snapshots after persisting a lot of events. Could that be that after recovering your snapshot you are replay a huge amount of events?
    Ruud Welling
    @WellingR
    @Sergey-Belebnev The only occurrence of the scala stream I can find in the code is actually related to reading binary data from oracle specifically
    It seems that for every byte, but an int, and a pointer will be created. If I assume that pointers are compressed (as far as I know this is the default as long as your jvm has less than 32GB memory) then for every byte of data an additional 8 bytes are allocated (4 bytes for the integer, and 4 for the 32-bit pointer)
    Ruud Welling
    @WellingR
    This would explain why for a 400MB snapshot and additional 3.2GB might be allocated.
    (the above is a minimum, but the seemingly simple functional algorithm is probably not even less efficient given your memory usage)
    Ruud Welling
    @WellingR
    Potential fix for this issue
    @Sergey-Belebnev I would appreciate if you would have the time to run a test with this version (you should build it yourself though)
    David Roon
    @adridadou
    hi everyone, how can I apply H2-Schema.sql on start for akka-persistence-jdbc ?
    It is unclear to me how to do that
    Sergey-Belebnev
    @Sergey-Belebnev
    @WellingR
    I tested your fix on 400 MB snapshot and result is incredible!
    Instead of 8GB of memory now process of recovering uses about 2GB.
    I'll hope new version with your fix will be realised ASAP.
    Could you tell estimated realise date?
    Thanks a lot!
    Ruud Welling
    @WellingR
    @adridadou do you mean for testing? You can find an example in the akka-persistence-jdbc tests.
    @Sergey-Belebnev I would like to make a release when the issues in the 3.5.0 milestone are resolved/merged
    Hopefully this will not take too long, but I cannot make any promises.
    David Roon
    @adridadou
    @WellingR yes. I’ll have a look
    David Roon
    @adridadou
    so my issue is that all the tests I can find use postgres
    and therefore assume that the tables are ready
    I don’t see a way to create, on the fly, in a in memory h2 database
    Ruud Welling
    @WellingR
    See DropCreate in our tests, here we load the schema sql file and execute it on the database
    It works for all databases
    Ruud Welling
    @WellingR
    The latest akka-persistence-jdbc 3.5.0 release is now available on maven central!
    Adam Chaulk
    @acchaulk
    has anyone here tried to configure slick to use a read-only replica (postgres) for reads, specifically for the eventsByPersistenceId query?
    Ruud Welling
    @WellingR
    Do you mean that you want to use a different slick database connection for your persistent queries?
    I think you should be able to use the following configuration example, with the only different that you configure the different jdbc connection for the jbdc-read-journal
    Adam Chaulk
    @acchaulk
    ah, right, I think that is what I'm looking for. thanks!
    Ruud Welling
    @WellingR
    Akka-persistence 3.5.2 is now available on maven central. This release is similar to 3.5.1, however it includes support for scala 2.13.0
    Renato Cavalcanti
    @renatocaval
    Thanks @WellingR!
    Dave
    @dave-fl
    Hi, is it possible at all to obtain the session from akka-persistence-jdbc for a "regular" slick session, so that they are shared.
    Dave
    @dave-fl
    @WellingR I do not see anything in ther related to session. Wouldn't I need the same session to share the connection pool.
    Ruud Welling
    @WellingR
    In most cases one connection corresponds to one session. Sharing sessions implies sharing connections
    Dave
    @dave-fl
    @WellingR yes, i dont think this is 1 connection. This is a connection pool.
    Would like to share the pool.
    or do multiple sessions all occupy from the same pool?
    Ruud Welling
    @WellingR
    The wording in the readme could be improved. The slick database can be shared, which means that the connection pool will be shared too.
    David Roon
    @adridadou
    hi everyone! Just trying out the plugin and I have a question. Is there a way of sharing the database connection between akka-persistence-jdbc and play?
    I’m using slick there and It seems like they are in conflict
    David Roon
    @adridadou
    does anyone here has experience and could provide an example of akka-persistence-jdbc working within play that uses slick
    ?
    Ruud Welling
    @WellingR

    I’m using slick there and It seems like they are in conflict

    What do you mean exactly? Why does there seem to be a conflict?

    I am not completely sure if it is possible to share the slick Database connection pool between play and akka-persistence-jdbc. But it should be possible to configure akka-persistence-jdbc and play to use similar connection settings. This way the components create their own Slick Database (i.e. their own connection pools and asyncExecutors).