Live data from Hacker News

Back from the Future: Global Tables in CockroachDB

cockroachlabs.com

11–13 of 13 posts

Re: Back from the Future: Global Tables in CockroachDB

#11
Is something similar possible using Postgres / Citus?

E.g. If I have a multi-tenant architecture but want a global table for say a postgres full-text-search index of content from the distributed tenants, what would the recommend route be?

Global tables seem like a great feature. I'd gladly sacrifice write speed for it.

Re: Back from the Future: Global Tables in CockroachDB

#12
post #6
post #3

Earlier quoted context omitted.

Instead of doing all this complicated thing, how about simply following a Raft-like consensus protocol with the minor modification that the leader won't include a write op its read processing until that write op has been applied to the log of all the replicas, not just the quorum. When the heartbeat response from replicas indicates to the leader that this write op has been applied everywhere, it can advance its inter…

> until that write op has been applied to the log of all the replicas, not just the quorum That removes all the fault tolerance. What do you do if you never get the acknowledgement from all replicas?

That question doesn’t make much sense. If you have quorum then eventually repairs will kick in and will get replicated everywhere.

So it can tolerate up to N/2 failures just like other consensus system. Because this is basically Raft.

Re: Back from the Future: Global Tables in CockroachDB

#13
post #3

Earlier quoted context omitted.

Instead of doing all this complicated thing, how about simply following a Raft-like consensus protocol with the minor modification that the leader won't include a write op its read processing until that write op has been applied to the log of all the replicas, not just the quorum. When the heartbeat response from replicas indicates to the leader that this write op has been applied everywhere, it can advance its inter…

I don't think this scheme provides the "monotonic reads" property discussed in the blog post. Specifically, it would be possible for a reader to observe a new value from r2 (who received a timely heartbeat), then to later observe an older value from r3 (who received a delayed heartbeat). This would be a violation of linearizability, which mandates that operations appear to take place atomically, regardless of which r…

Thanks. Yes this explanation is something I can agree with. It does not provide monotonic reads.
Post reply on HN