These are chat archives for RBMHTechnology/eventuate

24th
Aug 2017
Rouge_yk
@hanchenyi
Aug 24 2017 07:11
@krasserm https://github.com/hanchenyi/FirstAkkaProject/wiki/Questions-about-EventSourcedWriter, Here goes the complete information. Thank you very much.
Martin Krasser
@krasserm
Aug 24 2017 08:33
The problem is that a Writable is a mutable object that is concurrently updated by different threads, one is the event handler thread (that calls onEvent and adding items), others are those for database interactions (clearing items from the writables).
Rouge_yk
@hanchenyi
Aug 24 2017 10:55
@krasserm This is what we did. Now I try to stop calling clear method of EventSourcedWriter when write method is called. There are still data loss to database. Theoretically, If I stop calling clear method, there would be more DBIO actions to execute in write method. Should I try to adjust the value of replayBatchSize?
Martin Krasser
@krasserm
Aug 24 2017 11:03
You should redesign your app to use an immutable version of Writable. Also mock the database for testing purposes. This will also allow you to share a runnable version of your example which is much easier for me to debug.
Rouge_yk
@hanchenyi
Aug 24 2017 11:34
@krasserm Thanks a lot. I will use batch as a variable sequence to collect DBIO actions during event sourcing. Remove the mutable object Writable, see what happens ! I hope it works. Thank you krasserm.