|
54 | 54 | * HostDistance#LOCAL LOCAL} replicas for the query <em>if possible</em> (i.e. if the query's |
55 | 55 | * {@linkplain Statement#getRoutingKey(ProtocolVersion, CodecRegistry) routing key} is not |
56 | 56 | * {@code null} and if the {@linkplain Metadata#getReplicasList(String, String, Token.Factory, |
57 | | - * ByteBuffer)} (String, ByteBuffer) set of replicas} for that partition key is not empty). If |
| 57 | + * ByteBuffer) set of replicas} for that partition key is not empty). If |
58 | 58 | * no local replica can be either found or successfully contacted, the rest of the query plan |
59 | 59 | * will fall back to the child policy's one. |
60 | 60 | * </ul> |
|
81 | 81 | * primary replica ordering from the token ring). |
82 | 82 | * <li>Remote replicas second: remaining replicas (typically in remote datacenters) are appended, |
83 | 83 | * but only if they are up and not ignored by the child policy. |
84 | | - * <li>No non-replica hosts: unlike regular queries, LWT plans do not fall back to non-replica |
85 | | - * hosts, ensuring all attempts target actual replicas to maintain LWT correctness and reduce |
86 | | - * coordinator forwarding overhead. |
| 84 | + * <li>Replica-only routing when possible: under normal conditions, LWT query plans target only |
| 85 | + * replicas for the partition in order to reduce coordinator forwarding overhead and improve |
| 86 | + * performance. When replica information is unavailable, the driver falls back to the child |
| 87 | + * policy as described in the fallback behavior below, which may include non-replica hosts. |
87 | 88 | * </ul> |
88 | 89 | * |
89 | 90 | * <p><strong>Rack awareness</strong> is intentionally <em>not</em> applied to LWT replica ordering. |
|
0 commit comments