SiyaoIsHiding commented on code in PR #1640:
URL: 
https://github.com/apache/cassandra-java-driver/pull/1640#discussion_r1586980425


##########
core/src/main/java/com/datastax/oss/driver/api/core/tracker/RequestTracker.java:
##########
@@ -148,16 +204,17 @@ default void onNodeSuccess(
    * @param executionProfile the execution profile of this request.
    * @param node the node that returned the successful response.
    * @param requestLogPrefix the dedicated log prefix for this request
+   * @param executionInfo the execution info containing the results of this 
request
    */
   default void onNodeSuccess(
       @NonNull Request request,
       long latencyNanos,
       @NonNull DriverExecutionProfile executionProfile,
       @NonNull Node node,
-      @NonNull String requestLogPrefix) {
-    // If client doesn't override onNodeSuccess with requestLogPrefix delegate 
call to the old
-    // method
-    onNodeSuccess(request, latencyNanos, executionProfile, node);
+      @NonNull String requestLogPrefix,
+      @NonNull ExecutionInfo executionInfo) {
+    // delegate call to the old method
+    onNodeSuccess(request, latencyNanos, executionProfile, node, 
requestLogPrefix);

Review Comment:
   Can we do this in `CqlRequestHandler.NodeResponseCallback.trackNodeError`?
   ```java
       private void trackNodeError(Node node, Throwable error, long 
nodeResponseTimeNanos) {
         if (requestTracker instanceof NoopRequestTracker) {
           return;
         }
         if (nodeResponseTimeNanos == NANOTIME_NOT_MEASURED_YET) {
           nodeResponseTimeNanos = System.nanoTime();
         }
         long latencyNanos = nodeResponseTimeNanos - this.nodeStartTimeNanos;
         ExecutionInfo executionInfo =
                 new DefaultExecutionInfo(
                         statement,
                         node,
                         startedSpeculativeExecutionsCount.get(),
                         execution,
                         errors,
                         null,
                         null,
                         true,
                         session,
                         context,
                         executionProfile);
         requestTracker.onNodeError(
             statement, error, latencyNanos, executionProfile, node, logPrefix, 
executionInfo);
       }
   ```



-- 
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: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to