-
Notifications
You must be signed in to change notification settings - Fork 48
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
Clean up the log files #82
Comments
How about a configuration flag: something like “ephemeral”?
Plus documentation of course
You could also have a flag delete-all-files, for use when testing. But if so, perhaps print a message at startup: “Derecho restart in clean-up mode: deleting all persistent state”?
Ken
|
I suggest add persistent state detection in the application layer. At start up, the testers which do not require the persistent state, they are responsible for cleaning it up. For those may need the state, detect if the persistent state exists and keep or clean it accordingly. |
Okay, does this mean that if I run |
No.
In such case, the persistent data will be cleaned. |
This is something to document now, while it is on your mind!
|
We write the view to disk for fault tolerance. We also write the subgroup states to disk if the application is using
persistent<T>
variables in those subgroups. Then when we start our application, it checks if there are stored log files and if yes, builds the state from the log files as appropriate for a restart case.While this is great, some of our applications in
applications/demos
andapplications/tests
are short-lived derecho groups that exit once they are done with their purpose. They aren't meant to work well with restarts. Furthermore, if we start one application which exits peacefully and then start another application without deleting the log files, the second application segfaults as it does not how to make sense of the logs. It is a nuisance to manually delete the log files every time we run an application for testing purposes.For applications that have nothing to do with restart, we should
a) Delete the log files in the beginning of main. The log file location can be obtained from the configuration variable
CONF_PERS_FILE_PATH
.b) Delete the log files at the end of main when the group object has been destroyed. This will help applications that are started afterwards which do care about the log files.
Note that this is a per-application fix, not a library fix, since we want the fresh start and restart case to look exactly similar from the Derecho API level: Check if log files exist and adjust accordingly. This is so that the applications that do require restart need not make any extra adjustments.
The text was updated successfully, but these errors were encountered: