Closed rodaine closed 4 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 65.99%. Comparing base (
c55a48f
) to head (e4a373f
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, Thanks for this great module! Ran into a data race while interacting concurrently with the multipart capabilities. It appears that the uploader lock is not consistently obtained when completing or aborting a multipart upload, which ends up racing on bucket access. This patch now obtains the lock for these two methods. Data race output below for reference:
Data race trace
``` ================== WARNING: DATA RACE Read at 0x00c003823a10 by goroutine 601: runtime.mapaccess1_faststr() ~/.gimme/versions/go1.22.1.darwin.arm64/src/runtime/map_faststr.go:13 +0x40c github.com/johannesboyne/gofakes3.(*uploader).getUnlocked() ~/pkg/mod/github.com/johannesboyne/gofakes3@v0.0.0-20240217095638-c55a48f17be6/uploader.go:467 +0x124 github.com/johannesboyne/gofakes3.(*uploader).UploadPart() ~/pkg/mod/github.com/johannesboyne/gofakes3@v0.0.0-20240217095638-c55a48f17be6/uploader.go:380 +0xf4 github.com/johannesboyne/gofakes3.(*GoFakeS3).putMultipartUploadPart() ~/pkg/mod/github.com/johannesboyne/gofakes3@v0.0.0-20240217095638-c55a48f17be6/gofakes3.go:901 +0x5f0 github.com/johannesboyne/gofakes3.(*GoFakeS3).routeMultipartUpload() ~/pkg/mod/github.com/johannesboyne/gofakes3@v0.0.0-20240217095638-c55a48f17be6/routing.go:180 +0x108 github.com/johannesboyne/gofakes3.(*GoFakeS3).routeBase() ~/pkg/mod/github.com/johannesboyne/gofakes3@v0.0.0-20240217095638-c55a48f17be6/routing.go:43 +0x4cc github.com/johannesboyne/gofakes3.(*GoFakeS3).routeBase-fm()