absurdfarce commented on code in PR #2060:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2060#discussion_r2492391614


##########
core/src/main/java/com/datastax/oss/driver/api/core/tracker/RequestIdGenerator.java:
##########
@@ -67,6 +67,10 @@ default String getCustomPayloadKey() {
 
   default Statement<?> getDecoratedStatement(
       @NonNull Statement<?> statement, @NonNull String requestId) {
+    // in case of retry or speculative execution
+    if (statement.getCustomPayload().containsKey(getCustomPayloadKey())) {

Review Comment:
   Maybe I'm missing something but as I understand it the question isn't 
whether node request ID contains session request ID or not.  The question is 
whether we should update the node request ID (regardless of it's structure) 
when we need to send retries or speculative executions.  In other contexts we 
go to considerable lengths to make sure we're sending the exact same messages 
we sent earlier... so it seems a bit weird not to do so here.
   
   The W3C docs linked above indicate that trace-id SHOULD be unique but they 
don't require it.  Furthermore they're talking about uniqueness across 
individual requests; this spec is silent on things like retrying a request.  
And at least some sources I'm finding seem to indicate that the same trace-id 
should be used if a transaction is retried.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to