You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that setState is getting called all over the place this introduces a whole bunch of potential states in history where the json state file is empty.
The code should write to a temp file and then mv the temp file over the existing file (which in unix can be an atomic operation) It is important that the temp file lives in the exact same directory as well, because it can only be somewhat assure to be atomic if it is just changing inode table entries.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Currently
nomad/client/util.go
Line 88 in 7db2eb0
According to golang docs WriteFile https://golang.org/pkg/io/ioutil/#WriteFile will truncate a file that exists before writing to it.
Given that
setState
is getting called all over the place this introduces a whole bunch of potential states in history where the json state file is empty.The code should write to a temp file and then mv the temp file over the existing file (which in unix can be an atomic operation) It is important that the temp file lives in the exact same directory as well, because it can only be somewhat assure to be atomic if it is just changing inode table entries.
The text was updated successfully, but these errors were encountered: