forked from TrueCloudLab/restic
internal/cache: extend description of cache sharing test failure
This commit is contained in:
parent
1220fe9650
commit
7fc178aaf4
1 changed files with 6 additions and 3 deletions
9
internal/cache/file_test.go
vendored
9
internal/cache/file_test.go
vendored
|
@ -207,10 +207,13 @@ func TestFileLoad(t *testing.T) {
|
|||
// Simulate multiple processes writing to a cache, using goroutines.
|
||||
//
|
||||
// The possibility of sharing a cache between multiple concurrent restic
|
||||
// processes isn't guaranteed in the docs and doesn't always work on Windows
|
||||
// due to the Go runtime opening files without FILE_SHARE_DELETE, hence the
|
||||
// check on GOOS. This is considered a "nice to have" on POSIX, for now.
|
||||
// processes isn't guaranteed in the docs and doesn't always work on Windows, hence the
|
||||
// check on GOOS. Cache sharing is considered a "nice to have" on POSIX, for now.
|
||||
//
|
||||
// The cache first creates a temporary file and then renames it to its final name.
|
||||
// On Windows renaming internally creates a file handle with a shareMode which
|
||||
// includes FILE_SHARE_DELETE. The Go runtime opens files without FILE_SHARE_DELETE,
|
||||
// thus Open(fn) will fail until the file handle used for renaming was closed.
|
||||
// See https://devblogs.microsoft.com/oldnewthing/20211022-00/?p=105822
|
||||
// for hints on how to fix this properly.
|
||||
func TestFileSaveConcurrent(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue