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
I noticed that while it looks like NewChunker returns a new chunker based on the given options, it actually depends on the global table variable, meaning two chunkers with different seed values will stomp on each other, and chunkers cannot be constructed concurrently without causing a data race.
WARNING: DATA RACE
Read at 0x00000594c720 by goroutine 163:
github.com/jotfs/fastcdc-go.NewChunker()
/Users/jb/go/pkg/mod/github.com/jotfs/[email protected]/fastcdc.go:110 +0x124
...
Previous write at 0x00000594c720 by goroutine 206:
github.com/jotfs/fastcdc-go.NewChunker()
/Users/jb/go/pkg/mod/github.com/jotfs/[email protected]/fastcdc.go:110 +0x155
...