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

Journal mixes up remove operations and cancelling put operations #45

Closed
Tracked by #47
MSDarwish2000 opened this issue Feb 17, 2023 · 0 comments · Fixed by #69
Closed
Tracked by #47

Journal mixes up remove operations and cancelling put operations #45

MSDarwish2000 opened this issue Feb 17, 2023 · 0 comments · Fixed by #69
Labels
bug Something isn't working FileKache
Milestone

Comments

@MSDarwish2000
Copy link
Member

Describe the bug
The expected behavior for the cache when writeFunction fails and the key has an existing value is to keep this value. The reason behind this behavior will be documented. But, the journal v1 represents this by a dirty operation followed by remove operation. This is the same behavior when deleting an existing key.
This results in missing entries when reopening the journal with possible orphan files.

To Reproduce
Steps to reproduce the behavior:

  1. Put an entry into DiskLruCache
  2. Re-put the same key asynchronously, throwing a cancellation exception for example
  3. Close and re-open the cache

Expected behavior
The old value should be existing for this key.

System (please complete the following information):
Any system

Additional context
Not applicable

@MSDarwish2000 MSDarwish2000 added bug Something isn't working FileKache labels Feb 17, 2023
@MSDarwish2000 MSDarwish2000 mentioned this issue Feb 17, 2023
4 tasks
@MSDarwish2000 MSDarwish2000 added this to the Kache v2.0.0 milestone Feb 18, 2023
@MSDarwish2000 MSDarwish2000 reopened this Apr 15, 2023
@MSDarwish2000 MSDarwish2000 linked a pull request Apr 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FileKache
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant