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

ObjectRepositoryCachingLocalFs is not atomic #1001

Open
sergiimk opened this issue Dec 19, 2024 · 0 comments
Open

ObjectRepositoryCachingLocalFs is not atomic #1001

sergiimk opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sergiimk
Copy link
Member

Describe the bug

ObjectRepositoryCachingLocalFs repo wrapper used to cache small S3 objects in the node writes to files in non-atomic way.

Steps To Reproduce

n/a

Current Behavior

A network error or an error during writing a file may result in a permanently corrupted file, breaking the node until cache is cleared or pod is restarted.

Expected Behavior

This wrapper should use the same strategy as ObjectRepositoryLocalFs - writing to a randomly named file first, and then performing atomic rename. Caching wrapper can actually use ObjectRepositoryLocalFs directly to avoid reimplementing this logic.

kamu system info

0.213.1

Logs

No response

Anything else?

No response

@sergiimk sergiimk added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant