coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.77k stars 172 forks source link

cache: put cache data after writing the data successfully #430

Open nak3 opened 7 years ago

nak3 commented 7 years ago

cache: put cache data after writing the data successfully

This patch changes the cache data to put after writing the data to local or peers successfully. As current code put the cache before writing the data, it causes conflict when the writing the data failed.

xiang90 commented 7 years ago

How did you spot this bug? do you mind adding a test for this?

nak3 commented 7 years ago

Thank you. I updated. Sure, I can add a test for this. But it looks like I should wait for https://github.com/coreos/torus/pull/359, as some test utilities would be added.