-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix Truncated ArchiveCacheMethod #30
Fix Truncated ArchiveCacheMethod #30
Conversation
…CacheMethod.FlushAsync method.
I am confused by this. Am I misunderstanding what the flush is intended to do? Is it saying it expects the entry to be null?
|
I checked the issue, and what the test is expecting, is correct. In hindsight, I've just named that method badly. I'll make a note to rename it in version 0.9.0+ while making it deprecated in 0.8.0. Regarding why it supposedly fails as mentioned in #29, I actually can't pinpoint the issue. I'll update your branch with an additional test to make sure to check if the ArchiveCacheMethod contains the cache correctly after the stream is disposed and reopened for non-raw data that needs to be serialized and deserialized. Right now it's only checking raw byte arrays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the additional test. You'll have to revert your change back to Truncate
since that's the actual intent.
Since I still can't find the issue and that my tests are succeeding (after reverting your change, but I left that alone in my commit), maybe you're able to find the original issue now that you have more information?
Oh, and I also updated master to use .NET Core 3.1.101 for CI and changed the required checks. You'll have to update your branch from master to have them picked up properly.
Because #29 hasn't been an issue for a while, I'm closing this. If there's still a problem, feel free to open a new issue/PR. |
Currently when flushed, the
ArchiveCacheMethod
writes the archive to disk by disposing of thearchive
andarchiveStream
. Once done, it reopens the archive so that it can be used for more caching. Currently when reopening, the FileMode is set toTruncate
immediately clearing the archive file that was just created as a result of the flush.This PR just changes it to
OpenOrCreate
as it is when theArchiveCacheMethod
is first instanced.Intended to fix #29