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
If someone calls ReadStream, then proceeds to read from it slowly, then someone else calls WriteStream, the reader will start to get the new resource contents part-way through. This is because createKeyFileWithNoLock calls os.OpenFile with O_TRUNC set when updating a file, and the existing reader ends up pointing at the new data.
The text was updated successfully, but these errors were encountered:
…after write.
This reworks the createKeyFileWithLock function (used only by
writeStreamWithLock) so it always writes to a temporary file, which
is renamed by writeStreamWithLock when complete. A deferred recover is
added to clean up the temporary file if writing fails. This essentially
deprecates the TempDir option by making all writes atomic.
If someone calls ReadStream, then proceeds to read from it slowly, then someone else calls WriteStream, the reader will start to get the new resource contents part-way through. This is because createKeyFileWithNoLock calls os.OpenFile with O_TRUNC set when updating a file, and the existing reader ends up pointing at the new data.
The text was updated successfully, but these errors were encountered: