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

Journaling and Snapshot improvement #118

Open
SimonVillage opened this issue Apr 25, 2022 · 0 comments
Open

Journaling and Snapshot improvement #118

SimonVillage opened this issue Apr 25, 2022 · 0 comments

Comments

@SimonVillage
Copy link

On restart the engine throws an error that the file already exists. The following should solve this problem.

Comment this line:

https://github.com/mzheravin/exchange-core/blob/eb926cb7779c8fdf0571ed2300f53a8be3606452/src/main/java/exchange/core2/core/processors/journaling/DiskSerializationProcessor.java#L366

Add filesCounter++; to:

https://github.com/mzheravin/exchange-core/blob/eb926cb7779c8fdf0571ed2300f53a8be3606452/src/main/java/exchange/core2/core/processors/journaling/DiskSerializationProcessor.java#L434

Snapshot kind of works but it would be great if the engine would read the values from the main log and set the snapShotId in InitialStateConfiguration.lastKnownStateFromJournal() automatically if not provided.

The dumpId() when generating a snapshot should automatically increase if not provided.

This would allow the engine to restart and to read the last snapshot automatically as well as writing a snapshot with the next id without providing it.

@KabDeveloper you have been working a bit on this and provided a PR to fix a different issue with the journaling. Would you be interested to provide a PR for this too? Otherwise I would look into it but I usually don't do much Java and would like to avoid making any mistakes.

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

No branches or pull requests

2 participants
@SimonVillage and others