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

'WriteAll' replication logic works in series. Why? #260

Open rstrlcpy opened 8 years ago

rstrlcpy commented 8 years ago

I see that Read data-path has ability to do parallel-read (ReadSpread), but write does not have. Any reasons?

xiang90 commented 8 years ago

@Ramzec I do not think there is a reason other than simplicity of failure handling to start. Probably we need to optimize it. Do you want to help on it?

rstrlcpy commented 8 years ago

Ok, i will try.

barakmich commented 8 years ago

I tried it once, but didn't get much benefit, as all the writes needed to complete anyway. Though that was many iterations ago, so it couldn't hurt to try it again.

xiang90 commented 8 years ago

@barakmich I think he wants to do parallel writes and waits for all to finish. We should have some gain there when the replication factor is 3 or 5.

rstrlcpy commented 8 years ago

There are two implementations can be:

  1. wait for all writes
  2. wait for N successful writes

Current implementation of "WriteAll" allows to have one successful write, in this case do not need to wait all writers. This can be implemented as separate write-level.