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
DM-35458: Always write local datastore files to temporaries #705
Conversation
Codecov Report
@@ Coverage Diff @@
## main #705 +/- ##
==========================================
+ Coverage 84.54% 84.55% +0.01%
==========================================
Files 243 243
Lines 31825 31835 +10
Branches 5966 5969 +3
==========================================
+ Hits 26906 26918 +12
+ Misses 3747 3745 -2
Partials 1172 1172
Continue to review full report at Codecov.
|
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.
Looks OK. Any chance to test the new path? (Maybe start writing a large file, then use inotify to see that the temp file has shown up?)
This allows for an atomic rename in case something goes wrong in the file writing.
There is not a special path for local files any more. Everything uses a temporary and I can confirm that the log messages are showing that the temporary is in use and is then moved over to the final location. |
But you don't check those log messages in a test case, do you? In this case the side effect of the implementation choice is significant. |
I don't check the log message. What I can do is add a check that the resources logger is reporting a move transfer for local writes. The only code choice there is is whether a move or copy is happening to the temporary file (and whether the temp file is inside datastore or not). |
This allows for an atomic rename in case something goes wrong
in the file writing.
Checklist
doc/changes