Cassandra mismatch between nodetool getendpoints and cqlsh trace - Stack Overflow

I am trying to determine which nodes a specific piece of data is actually stored on, but I noticed that

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 and dc2.

  • I am using NetworkTopologyStrategy, with a replication factor of 2 for both dc1 and dc2.

  • 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:

  1. Why does the result of nodetool getendpoints not match the "Send read message to" nodes in cqlsh trace?

  2. 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信