Closed jitendra-nalwaya closed 1 year ago
Hi @jhouserizer,
Used two sentinel files to identify last shutdown status in below scenarios -
1) When customer upgrade their environment with this enhancement. 2) Remove directory structure explicitly by customer. 3) Remove directory structure using destroy/destroyall methods.
On startup,
We can use single sentinel file as well if we write some content in it to identify the last shutdown state.
Could you please elaborate below statement - Managing two files is non-atomic, and therefore more prone to leaving one behind when it need not be, or etc.?
@chrisdennis Creating a single "clean" marker on shutdown and verifying on startup (and then delete it). Please review.
@chrisdennis Introduce new API isClean() to identify state(normal/abnormal) of stopped service, please review.
@chrisdennis I addressed review comments. Please review.
@chrisdennis New pull request is created with 2 commits - https://github.com/ehcache/ehcache3/pull/3161
Enhancement #2954 implemented by https://github.com/ehcache/ehcache3/pull/3161
Hi @jitendra-nalwaya ,
Could you please explain the purpose of using two sentinel files ("cleanShutdown" and "unCleanShutdown")?
What does using two files rather than one provide? why can't the presence of "unCleanShutdown" indicate non-clean, and the absence of it represent clean? or why can't the presence of "cleanShutdown" represent clean, and the absence represent non-clean?
Managing two files is non-atomic, and therefore more prone to leaving one behind when it need not be, or etc.?
There may be an advantage to using two files, and if so, can you please explain?