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/fastcdc-go@v0.2.0/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/fastcdc-go@v0.2.0/fastcdc.go:110 +0x155
...
The text was updated successfully, but these errors were encountered:
calmh
added a commit
to kastelo-labs/fastcdc-go
that referenced
this issue
Oct 5, 2020
Instead copy it when we want to use a new seed.
Fixes the example test which in fact had incorrect output when run on
its own, depending on the old behavior of someone else having clobbered
the global table previously.
pbtrung
added a commit
to pbtrung/fastcdc-go
that referenced
this issue
Dec 22, 2020
Hi! Thanks for this implementation!
I noticed that while it looks like
NewChunker
returns a new chunker based on the given options, it actually depends on the globaltable
variable, meaning two chunkers with different seed values will stomp on each other, and chunkers cannot be constructed concurrently without causing a data race.The text was updated successfully, but these errors were encountered: