johannesboyne / gofakes3

A simple fake AWS S3 object storage (used for local test-runs against AWS S3 APIs)
MIT License
361 stars 84 forks source link

Fs backend fixes #81

Closed shabbyrobe closed 1 year ago

shabbyrobe commented 1 year ago

Hallo! I found a bunch of bugs and usability headaches with the filesystem backend while trying to stitch something in to a dockerised dev env setup:

The single bucket backend is hashing the files on every stat, which will be abusively slow if you're using big files. I wonder if it's ok to add an option that lets you say "if there's no metadata, a hash of the size and mtime is sufficient"? I wouldn't want that to be the default but opt-in could be useful.

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
3.4% 3.4% Duplication

shabbyrobe commented 1 year ago

Thanks for the review, @johannesboyne! I'll try to whip up another PR with that flag to do the el-cheapo fast hashing this week.