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

Loader: Atomic write of files #1342

Closed
bschmalhofer opened this issue Oct 20, 2021 · 1 comment
Closed

Loader: Atomic write of files #1342

bschmalhofer opened this issue Oct 20, 2021 · 1 comment
Assignees
Labels
question Further information is requested wontfix This will not be worked on
Milestone

Comments

@bschmalhofer
Copy link
Contributor

A bit unrelated is a potential problem with writing files in the Loader. The writing of the loader files is not atomic. This means that another another process might detect the existence of the file, and the client might request it before it is completely written. In practice the timing is likely such that problems never occurs.

Originally posted by @bschmalhofer in #1325 (comment)

@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Oct 20, 2021
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.1, OTOBO 10.1.1 Nov 5, 2021
bschmalhofer added a commit that referenced this issue Nov 5, 2021
in-memory cache keeps references as they are
in-backend cache follows references and keeps a snapshot of the current value
bschmalhofer added a commit that referenced this issue Nov 5, 2021
mostly using ternary operator and postscript references
@bschmalhofer bschmalhofer self-assigned this Nov 5, 2021
@bschmalhofer bschmalhofer added the question Further information is requested label Nov 5, 2021
bschmalhofer added a commit that referenced this issue Nov 5, 2021
@bschmalhofer bschmalhofer added the wontfix This will not be worked on label Nov 5, 2021
@bschmalhofer
Copy link
Contributor Author

I still think that there is a potential problem with incomplete files being delivered by the web server. But simply switching to atomic writes might lead to concurrent writes to the same file, which might have bad effects too. So, let's not change the current behaviour as there are no current error reports.

Nevertheless some mild code improvements were applied. Closing the issue as wontfix,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant