I am trying to determine which nodes a specific piece of data is actually stored on, but I noticed that the results of nodetool getendpoints
and cqlsh trace
do not match.
Setup:
My Cassandra cluster consists of two data centers:
dc1
anddc2
.I am using
NetworkTopologyStrategy
, with a replication factor of 2 for bothdc1
anddc2
.To check where a specific partition is stored, I ran:
nodetool getendpoints keyspace_name table_name 10.123.123.123
The output shows 4 nodes: 2 nodes in dc1 2 nodes in dc2
Observation:
I enabled tracing in cqlsh using:TRACING ON;
In the trace output, I found 4 "Send read message to"
lines.
- Among them:
- 2 nodes (Red, Blue) are in dc1 match the nodetool getendpoints result.
- 2 nodes (Green, Gray) are in dc2, but they do not appear in nodetool getendpoints.
- My understanding is that the coordinator node (Orange) should determine the correct nodes using the partition key (10.123.123.123) and send read requests accordingly.
- The consistency level is set to
ONE
, meaning the first responding node should return the result.
Schema Information:
- The primary key of my table is:
PRIMARY KEY (eth0, area)
- The partition key is:
eth0 (10.123.123.123)
Questions:
Why does the result of nodetool getendpoints not match the
"Send read message to"
nodes in cqlsh trace?Based on the cqlsh trace output (attached image), which node actually responded to the query?
Additional Notes:
For data protection, some details in the attached image have been redacted.
Node colors in the image:
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744295521a4567241.html
评论列表(0条)