خرید بک لینک

Vote count: 0

Please note that the context of the question is "within a client session". i.e. I understand that a different client session to a different server could see stale data.

My question is how does Zookeeper guarantee that within a client session, a subsequent read always observes a previous write? (I'm pretty sure it is the case)

More specifically, consider the following set up (to simplify the discussion assuming the operation is synchronous):

I have Zookeeper server s1, s2 and s3. s1 is the ZAB master. I have a client c, which coects to s3 (its local replica) and establish a session with s3.

(1) c issues a write, which goes to s3, s3 identifies that it is not the master, s3 forwards the request to s1. Then a network partition happens between s3 and s1, so s1 is only able to replicate the write to itself and s2. Then the network partition heals itself, so s1 retus success to s3, which in tu retus success to the client.

(2) c issues a read, the reads goes to s3, s3 serves the read locally, which does not reflect the write in (1).

Could this ever happen? Thanks!

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 9 اسفند 1394 ساعت: 3:52

صفحه بندی