On Wed, Jan 31, 2018 at 12:08 PM, Oleksandr Shulgin < oleksandr.shul...@zalando.de> wrote:
> On 31 Jan 2018 17:18, "Jeff Jirsa" <jji...@gmail.com> wrote: > > > I don’t know why this is a surprise (maybe because people like to talk > about multiple rings, but the fact that replication strategy is set per > keyspace and that you could use SimpleStrategy in a multiple dc cluster > demonstrates this), but we can chat about that another time > > > The reason I find it surprising, is that it makes very little *sense* to > put a token belonging to a mode from one DC between tokens of nodes from > another one. > > I don't want to really turn this into an argument over what should and shouldn't make sense, but I do agree, it doesn't make sense to put a token on one node in one DC onto another node in another DC. But also being very clear (I want to make sure I understand what you're saying): that's a manual thing you did, Cassandra didn't do it for you, right? The fact that Cassandra didn't STOP you from doing it could be considered a bug, but YOU made that config choice? > Having token ranges like that, with ends from nodes in different DCs, > doesn't convey any *meaning* and have no correspondence to what is being > modelled here. It also makes it nearly impossible to reason about range > ownership (unless you're a machine, in which case you probably don't care). > > I understand that it works in the end, but it doesn't help to know that. > It is an implementation detail sticking outside the code guts and it sure > *is* surprising in all its ugliness. It also opens up the possibility of > problems just like the one which have started this discussion. > > I don't find the argument of using SimpleStrategy for multi-DC > particularly interesting, lest can I predict what to be expected from such > an attempt. > You can trivially predict what would happen with SimpleStrategy in multi-DC: run nodetool ring, and the first RF nodes listed after a given token own that data, regardless of which DC they're in. Because it's all one big ring.