问题
I have few questions regarding the digest request, I read through the docs and the following informations are not up to the point,
1) Lets say I have 10 node cluster with the RF =3 and RC = 2,
Also for understanding let the Replicas be Node 1, Node 2 and Node 3 and Coordinator be Node 4.
For the read request, As per my understanding first coordinator (Node 4) sends the direct request to one of the node with the lower latency (Dynamic snitch) say Node 1 and gets the data, then after receiving the data It sends the digest request to one of the next latency node say Node 2 and gets only the hash and compares with the hash calculated from direct request.
Ques 1 : Is the digest request send parallelley (to Node 2) with the direct request (Or) after receving the direct request It send the digest request ?
Ques 2 : I know the digest request for Node 3 also will be sent for data consistency, But when does the coordinator (Node 4) send the digest request to the third replica (Node 3) ? Is it after coordinator responding back to the client?
Ques 3 : Also It is mentioned in the doc only after completing the read repair the coordinator will respond back to the client?
Ques 4 : Apart from Tracing on, Could somebody explain the way to identify the read and write request flow in real time?
It would be Great, If you guys could explain these question with workflow, It will be useful for everyone.
I read through video also for reference : https://www.youtube.com/watch?v=HuDJBTPdaOA&list=PLm-EPIkBI3YorKfmT9LXpBhyeZMYAM1M7
回答1:
I am assuming your situation. Here N4 is coordinator node. You sent direct request to N2(which is a replica). After receiving response from N2, coordinator node(N4) will send a digest request to any of the nodes(N3 or N1) that is containing other replica. Let's say N3 is nearer node. So, the digest request will be sent to N3 to satisfy consistency level. After receiving response from N3 , N4 will compare the datas from N2 and N3 and return the updated data to the client.
There is another replica in N1 node. Now coordinator node sends digest request to all other replicas.(In this case N1). And if N4 finds, any node(N1, N2, N3) is not updated it runs a read repair request.
p.s: I don't know answer 4.
https://docs.datastax.com/en/cassandra/2.1/cassandra/dml/architectureClientRequestsRead_c.html
https://teddyma.gitbooks.io/learncassandra/content/client/read_requests.html
回答2:
For the 4th question, you can enable cass_log_set_level and set the log level to debug info and you can get the real time debug info.
来源:https://stackoverflow.com/questions/48072272/digest-request-in-cassandra