Skip to content
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

Fix race condition and Delta Operation incomplete generation #4

Merged
merged 3 commits into from
Aug 17, 2024

Conversation

mdouchement
Copy link
Contributor

@mdouchement mdouchement commented Aug 14, 2024

Fix #3

  • The race condition along with the different sizes of buff initialization was an issue
  • As stated in Delta Operation incomplete generation #3, when n, err = io.ReadAtLeast(source, buffer[validTo:validTo+r.BlockSize], r.BlockSize) ended on an io.EOF, n equals 0 and made the remaining data not written.
$ go test -run=NONE -fuzz=FuzzSync -race
fuzz: elapsed: 0s, gathering baseline coverage: 0/76 completed
fuzz: elapsed: 0s, gathering baseline coverage: 76/76 completed, now fuzzing with 16 workers
fuzz: elapsed: 3s, execs: 22875 (7624/sec), new interesting: 7 (total: 83)
fuzz: elapsed: 6s, execs: 51585 (9567/sec), new interesting: 9 (total: 85)
fuzz: elapsed: 9s, execs: 78026 (8802/sec), new interesting: 9 (total: 85)
...
fuzz: elapsed: 10m6s, execs: 6970026 (11394/sec), new interesting: 22 (total: 110)
fuzz: elapsed: 10m9s, execs: 7004121 (11363/sec), new interesting: 22 (total: 110)
fuzz: elapsed: 10m12s, execs: 7021020 (6222/sec), new interesting: 22 (total: 110)
PASS
ok      github.com/minio/rsync-go       613.028s

example_test.go Outdated Show resolved Hide resolved
fuzzing_test.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@harshavardhana harshavardhana merged commit ce5fd82 into minio:main Aug 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delta Operation incomplete generation
2 participants