Hacker News new | ask | show | jobs
by danielheath 932 days ago
Consider the case of two workers both trying to write the same key at once. Which one should succeed?
2 comments

If you use etags it's up to R2. I'm assuming R2 is consistent here.

So if you write to the same file twice, one write will succeed before the other and change the etag of the file, which should in theory cause the other request to R2 to fail because the etag you send with as conditional no longer matches.

Its up to your implementation. Which is very similar to any other "average" database ...