topicai / etcc

An simplified Go client of etcd
1 stars 0 forks source link

Investigate Get Quorum=true option #3

Open chenkaitopic opened 8 years ago

chenkaitopic commented 8 years ago

Seems like the issues are lost after migrating etcc repo. Reopen this.

chenkaitopic commented 8 years ago

From Yi: "How about we have a GetWithQuorum in addition to Get; just like SetWithTTL in addition to Set?" agree. Seems like we might be interested in using both Get and GetWithQuorum in the future.

Some more details for "quorum=true" https://github.com/coreos/etcd/issues/741 Some inputs:

  1. quorum=true means the read will go through etcd raft and ensures linearization, but brings some performance penalty.
  2. Without quorum=true, etcd ensures linearization for one client since they do a read redirection to leader to ensure the client that send out the previous write operation can see the result by a subsequent read operation.(This needs to be verified by taking a look at etcd client)
  3. Etcd attaches a index for each response. It is the logic clock in etcd. If we can make sure our clients always see monotonic increasing sequence of indexes, we can ensure linearization.