-
Notifications
You must be signed in to change notification settings - Fork 344
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
fs: TestReaddirplusParallel is flaky #476
Comments
Maybe #472 is related. |
Reliable way to reproduce: (neo) (z-dev) (g.env) kirr@deca:~/src/neo/src/github.com/hanwen/go-fuse/fs$ go test -run TestReaddirplusParallel -count 1000 -failfast
--- FAIL: TestReaddirplusParallel (0.03s)
mem_test.go:295: got 99 want 100
FAIL
exit status 1
FAIL github.com/hanwen/go-fuse/fs 1.256s
(neo) (z-dev) (g.env) kirr@deca:~/src/neo/src/github.com/hanwen/go-fuse/fs$ go test -run TestReaddirplusParallel -count 1000 -failfast
--- FAIL: TestReaddirplusParallel (0.04s)
mem_test.go:295: got 98 want 100
FAIL
exit status 1
FAIL github.com/hanwen/go-fuse/fs 8.927s
(neo) (z-dev) (g.env) kirr@deca:~/src/neo/src/github.com/hanwen/go-fuse/fs$ go test -run TestReaddirplusParallel -count 1000 -failfast
--- FAIL: TestReaddirplusParallel (0.04s)
mem_test.go:295: got 95 want 100
FAIL
exit status 1
FAIL github.com/hanwen/go-fuse/fs 10.289s go-fuse |
There is another element of randomization in the hashmap iteration order. (sigh). |
this change is old, but testing suggests this is still the method used. There are 8 different iteration orders. With the current approach in go-fuse you have to be somewhat unlucky for entries to move around between READDIRPLUS responses, but it's essentially the same problem as in #391 |
plan: store children as
this could also provide for persistent readdir semantics, by storing the changeCounter in the children list, and handing that out as a readdir cookie. |
Thanks for the fix. |
The previous code tried to make the result deterministic (See commit 74851f1), by always having the largest name at the end. This would work for simple hashtable. Go does not use this, as discussed in #476 (comment) Use sort.Slice() to sort the entries by name. Change-Id: Ibf576b00a214e38aa6bcd6b64ee6b9844408e04a
From #351 (comment) :
TestReaddirplusParallel:
The text was updated successfully, but these errors were encountered: