I saw through Alternator
query that a certain attribute that should have existed does not exist. But when I query through CQL, it shows that the attribute exists. I suspect it triggered a read repair.
Now I would like to ask if there is a way to turn off read repair for easier troubleshooting.
I see that parameters read_repair_chance
and dclocal_read_repair_chance
have been hard coded to 0, does this mean that read repair has been turned off?
TLDR: If you want to do trouble shooting, you can do reads with CL=ONE
, which will never trigger a read-repair, because it only reads from a single replica thus it will not have a chance to notice any differences between the data different replicas have.
Read repair cannot be turned off. ScyllaDB will start read-repair every time it notices that replicas that participate in the read have differences in what data they have. Note that whether these differences are noticed by the coordinator or not depends on which replicas are selected for the read. For example, if there are three replicas: A, B and C, with A and B having the same data for some partition and C having different data: a regular CL=QUORUM
read which reads from A and B would not trigger read repair, while a read from A and C would. Note that you can force a read repair by reading with CL=ALL
, in which case all replicas are read from.
I see that parameters
read_repair_chance
anddclocal_read_repair_chance
have been hard coded to 0, does this mean that read repair has been turned off?
These two parameter control probabilistic read repair. With read_repair_chance
set to 0.5
, there is a 50% chance on every read, that the coordinator will also read from all replicas (regardless of which CL the user set) and trigger a read repair if differences are detected. Note that the read will complete as soon as CL
replicas responded and then the remaining part will be moved to the background. The dclocal_read_repair_chance
works the same way, but only includes extra nodes from the local DC.
Setting these to 0
will only disable probabilistic read-repair, but not the regular read repair. There is no way to disable that.
Note that these two parameters are deprecated and we are about to remove them.