ipfs / go-ds-flatfs

A datastore implementation using sharded directories and flat files to store data
MIT License
46 stars 21 forks source link

Make puts "succeed" if they wouldn't change the file data anyways #79

Closed Stebalien closed 4 years ago

Stebalien commented 4 years ago

This works around a windows issue where some other process sees the new file and decides to open it in the wrong sharing mode.

Stebalien commented 4 years ago

I'd like to do the dumb thing for now. If we notice this showing up in all those windows performance profiles we'll never actually collect, then we can try to make it better. But I'm fine if the failure path is a bit slower in this case.

Stebalien commented 4 years ago

We're going to just repeatedly retry the put.