This isn’t necessarily true and cassandra has no coordinator-only consistency level to force this behavior
(The snitch is going to pick the best option for local_one reads and any compactions or latency deviations from load will make it likely that another replica is chosen in practice) > On Nov 11, 2020, at 3:46 AM, Alex Ott <alex...@gmail.com> wrote: > > > if you force routing key, then the replica that owns the data will be > selected as coordinator > >> On Wed, Nov 11, 2020 at 12:35 PM onmstester onmstester >> <onmstes...@zoho.com.invalid> wrote: >> Thanx, >> >> But i'm OK with coordinator part, actually i was looking for kind of read CL >> to force to read from the coordinator only with no other connections to >> other nodes! >> >> Sent using Zoho Mail >> >> >> >> >> ============ Forwarded message ============ >> From: Alex Ott <alex...@gmail.com> >> To: "user"<user@cassandra.apache.org> >> Date: Wed, 11 Nov 2020 11:28:56 +0330 >> Subject: Re: local read from coordinator >> ============ Forwarded message ============ >> >> token-aware policy doesn't work for token range queries (at least in the >> Java driver 3.x). You need to force the driver to do the reading using a >> specific token as a routing key. Here is Java implementation of the token >> range scanning algorithm that Spark uses: >> https://github.com/alexott/cassandra-dse-playground/blob/master/driver-1.x/src/main/java/com/datastax/alexott/demos/TokenRangesScan.java >> >> I'm not aware if Python driver is able to set routing key explicitly, but >> whitelist policy should help >> >> >> >> On Wed, Nov 11, 2020 at 7:03 AM Erick Ramirez <erick.rami...@datastax.com> >> wrote: >> Yes, use a token-aware policy so the driver will pick a coordinator where >> the token (partition) exists. Cheers! >> >> >> -- >> With best wishes, Alex Ott >> http://alexott.net/ >> Twitter: alexott_en (English), alexott (Russian) >> >> > > > -- > With best wishes, Alex Ott > http://alexott.net/ > Twitter: alexott_en (English), alexott (Russian)