Enhancement #2954 : Recover from fatal invalid cache state#3161
Merged
chrisdennis merged 2 commits intoehcache:masterfrom May 19, 2023
Merged
Enhancement #2954 : Recover from fatal invalid cache state#3161chrisdennis merged 2 commits intoehcache:masterfrom
chrisdennis merged 2 commits intoehcache:masterfrom
Conversation
Author
chrisdennis
requested changes
May 16, 2023
| if (cleanFile.createNewFile()) { | ||
| LOGGER.debug("clean file is created."); | ||
| } else { | ||
| LOGGER.warn("clean file already exists. The file didn't got deleted, may be due to network issue or file permission on directory." + |
Member
There was a problem hiding this comment.
Suggest:
"Clean file still exists on shutdown. This may be due to a filesystem consistency issue, or concurrent modification of the filesystem by another thread and/or process. Be aware for the potential of undetected storage corruption causing cache failures and/or data consistency issues.""Clean file could not be created on shutdown. This will cause the persisted state to be considered unclean on the next service start, which may result in unplanned data loss."
chrisdennis
requested changes
May 18, 2023
| LOGGER.debug("clean file is created."); | ||
| } else { | ||
| LOGGER.warn("clean file still exists on shutdown. This may be due to a filesystem consistency issue, or concurrent modification of the filesystem by another thread and/or process. Be aware for the potential of undetected storage corruption causing cache failures and/or data consistency issues." + | ||
| "\n Hint: clean file exists on service start-up, indicates service was stopped cleanly last time. It gets created while the service is stopped and it should be deleted while the service is started." + |
Member
There was a problem hiding this comment.
I don't think the additional lines here are necessary. Also, please capitalize the initial 'c' here: 'Clean'.
| } | ||
| } catch (IOException e) { | ||
| LOGGER.warn("clean file could not be created on shutdown. This will cause the persisted state to be considered unclean on the next service start, which may result in unplanned data loss. Reason: " + e.getMessage() + | ||
| "\n Hint: clean file exists on service start-up, indicates service was stopped cleanly last time. It gets created while the service is stopped and it should be deleted while the service is started." + |
Member
There was a problem hiding this comment.
Again, I think the additional lines are not needed. The first line states what has happened, and what may result, and again please capitalize the 'c'.
chrisdennis
approved these changes
May 18, 2023
Member
|
Looks good. If it were me I would squash those last 3 commits in to one before merging. Do that (or not, at your choosing) and then have someone on IST merge... or wait for me tomorrow morning. |
83a4900 to
1048ba4
Compare
Author
|
@chrisdennis |
Author
|
@chrisdennis |
5248595 to
511fe7b
Compare
chrisdennis
approved these changes
May 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.