twitter / storehaus

Storehaus is a library that makes it easy to work with asynchronous key value stores
Apache License 2.0
465 stars 92 forks source link

Remove mutex from ReadThroughStore and WriteThroughStore. #332

Closed ielashi closed 7 years ago

ielashi commented 7 years ago

Reasons for removing the mutex:

1) It severely limits throughput.

2) There is nothing about Read/WriteThroughStore that is not
   thread-safe. If it's to keep the data stores thread-safe, then it should
   be the data store's responsibility to do so.

3) If adding the mutex is to avoid race conditions, a mutex also doesn't
   protect against that if you have multiple clients.
johnynek commented 7 years ago

Seems reasonable, but this does not merge cleanly. Can you rebase against develop?

ielashi commented 7 years ago

Updated to resolved conflict.

sritchie commented 7 years ago

Works for me. Thanks @ielashi !

ielashi commented 7 years ago

@sritchie Thanks for merging! May I request we do a release with this change?