You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "rangadi (via GitHub)" <gi...@apache.org> on 2023/03/08 19:20:43 UTC

[GitHub] [spark] rangadi opened a new pull request, #40342: [SPARK-42721][CONNECT] RPC logging interceptor

rangadi opened a new pull request, #40342:
URL: https://github.com/apache/spark/pull/40342

   ### What changes were proposed in this pull request?
   
   This adds an gRPC interceptor in spark-connect server. It logs all the incoming RPC requests and responses. 
   
    - How to enable: Set interceptor config. e.g.
    
          ./sbin/start-connect-server.sh --conf spark.connect.grpc.interceptor.classes=org.apache.spark.sql.connect.service.LoggingInterceptor  --jars connector/connect/server/target/spark-connect_*-SNAPSHOT.jar 
   
    - Sample output:
   
           23/03/08 10:54:37 INFO LoggingInterceptor: Received RPC Request spark.connect.SparkConnectService/ExecutePlan (id 1868663481):   
           {
             "client_id": "6844bc44-4411-4481-8109-a10e3a836f97",
             "user_context": {
               "user_id": "raghu"
             },
             "plan": {
               "root": {
                 "common": {
                   "plan_id": "37"
                 },
                 "show_string": {
                   "input": {
                     "common": {
                       "plan_id": "36"
                     },
                     "read": {
                       "data_source": {
                         "format": "csv",
                         "schema": "",
                         "paths": ["file:///tmp/x-in"]
                       }
                     }
                   },
                   "num_rows": 20,
                   "truncate": 20
                 }
               }
             },
             "client_type": "_SPARK_CONNECT_PYTHON"
           }
         
   
   ### Why are the changes needed?
   This is useful in  development. It might be useful to debug some problems in production as well.
   
   ### Does this PR introduce _any_ user-facing change?
   no
   
   
   ### How was this patch tested?
    - Manually in development
    - Unit test
   


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40342:
URL: https://github.com/apache/spark/pull/40342#issuecomment-1463998900

   fine to me, cc @zhenlineo @amaliujia @hvanhovell FYI


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1131303296


##########
connector/connect/server/pom.xml:
##########
@@ -155,6 +155,12 @@
       <version>${protobuf.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java-util</artifactId>

Review Comment:
   Oh, that should be fine. I didn't realize it already included `protobuf-java-util`. Removed this change.
   Could you point me to where this dependency comes from? 



##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.connect.service
+
+import scala.util.Random
+
+import com.google.protobuf.Message
+import com.google.protobuf.util.JsonFormat
+import io.grpc.ForwardingServerCall.SimpleForwardingServerCall
+import io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
+import io.grpc.Metadata
+import io.grpc.ServerCall
+import io.grpc.ServerCallHandler
+import io.grpc.ServerInterceptor
+
+import org.apache.spark.internal.Logging
+
+/**
+ * A gRPC interceptor to log RPC requests and responses. It logs the protobufs as JSON.
+ * Useful for local development. An ID is logged for each RPC so that requests and corresponding
+ * responses can be exactly matched.
+ */
+class LoggingInterceptor extends ServerInterceptor with Logging {
+
+  private val jsonPrinter = JsonFormat.printer().preservingProtoFieldNames()
+
+  private def logProto[T](description: String, message: T): Unit = {
+    message match {
+      case m: Message =>
+        logInfo(s"$description:\n${jsonPrinter.print(m)}")
+      case other =>
+        logInfo(s"$description: (Unknown message type) $other")
+    }
+  }
+
+  override def interceptCall[ReqT, RespT](
+      call: ServerCall[ReqT, RespT],
+      headers: Metadata,
+      next: ServerCallHandler[ReqT, RespT]): ServerCall.Listener[ReqT] = {
+
+    val id = Random.nextInt(Int.MaxValue) // Assign a random id for this RPC.

Review Comment:
   I don't think so. This is just for debugging. UUID looks very long and makes the logs harder to read. I intentionally even avoided negative numbers :). 



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #40342:
URL: https://github.com/apache/spark/pull/40342#issuecomment-1464810053

   Hi, @rangadi and @hvanhovell . There is a `scalafmt` error. Here is a follow-up to recover CI
   - https://github.com/apache/spark/pull/40374


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1130607164


##########
connector/connect/server/pom.xml:
##########
@@ -155,6 +155,12 @@
       <version>${protobuf.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java-util</artifactId>

Review Comment:
   Without this pr, the server module depended on `protobuf-java-util:3.19.2 `. Should `protobuf-java-util` and `protobuf-java` always use the same version?



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] hvanhovell closed pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "hvanhovell (via GitHub)" <gi...@apache.org>.
hvanhovell closed pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor 
URL: https://github.com/apache/spark/pull/40342


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1132544305


##########
connector/connect/server/pom.xml:
##########
@@ -155,6 +155,12 @@
       <version>${protobuf.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java-util</artifactId>

Review Comment:
   You can check it  through
   ```
   build/mvn dependency:tree -pl connector/connect/server
   ```
   
   `protobuf-java-util` is the transitive dependency of `grpc-services`, but it is `runtime` scope.
   
   ```
   [INFO] +- io.grpc:grpc-services:jar:1.47.0:compile
   [INFO] |  \- com.google.protobuf:protobuf-java-util:jar:3.19.2:runtime
   ```
   
   So I think we should explicit add this dependency for compilation
   
   



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #40342:
URL: https://github.com/apache/spark/pull/40342#issuecomment-1461439265

   Need run `./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=false -Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl connector/connect/common -pl connector/connect/server -pl connector/connect/client/jvm` to format the code in connect modules


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on PR #40342:
URL: https://github.com/apache/spark/pull/40342#issuecomment-1461455759

   @LuciferYang thanks. Fixed.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1131461102


##########
connector/connect/server/pom.xml:
##########
@@ -155,6 +155,12 @@
       <version>${protobuf.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java-util</artifactId>

Review Comment:
   I removed the dependency and mvn build fails. But SBT is ok. Not sure where SBT gets the dependency from.
   What shall we do? 
   
   <img width="2263" alt="image" src="https://user-images.githubusercontent.com/502522/224126061-736648ee-da87-45de-9c6a-5f7f6f285e21.png">
   



##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.connect.service
+
+import scala.util.Random
+
+import com.google.protobuf.Message
+import com.google.protobuf.util.JsonFormat
+import io.grpc.ForwardingServerCall.SimpleForwardingServerCall
+import io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
+import io.grpc.Metadata
+import io.grpc.ServerCall
+import io.grpc.ServerCallHandler
+import io.grpc.ServerInterceptor
+
+import org.apache.spark.internal.Logging
+
+/**
+ * A gRPC interceptor to log RPC requests and responses. It logs the protobufs as JSON.
+ * Useful for local development. An ID is logged for each RPC so that requests and corresponding
+ * responses can be exactly matched.
+ */
+class LoggingInterceptor extends ServerInterceptor with Logging {
+
+  private val jsonPrinter = JsonFormat.printer().preservingProtoFieldNames()
+
+  private def logProto[T](description: String, message: T): Unit = {
+    message match {
+      case m: Message =>
+        logInfo(s"$description:\n${jsonPrinter.print(m)}")
+      case other =>
+        logInfo(s"$description: (Unknown message type) $other")
+    }
+  }
+
+  override def interceptCall[ReqT, RespT](
+      call: ServerCall[ReqT, RespT],
+      headers: Metadata,
+      next: ServerCallHandler[ReqT, RespT]): ServerCall.Listener[ReqT] = {
+
+    val id = Random.nextInt(Int.MaxValue) // Assign a random id for this RPC.

Review Comment:
   Build fails:
   
   ```
   [ERROR] [Error] /Users/raghu.angadi/w/spark/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:23: object util is not a member of package com.google.protobuf
   [ERROR] [Error] /Users/raghu.angadi/w/spark/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:40: not found: value JsonFormat
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1131312944


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.connect.service
+
+import scala.util.Random
+
+import com.google.protobuf.Message
+import com.google.protobuf.util.JsonFormat
+import io.grpc.ForwardingServerCall.SimpleForwardingServerCall
+import io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
+import io.grpc.Metadata
+import io.grpc.ServerCall
+import io.grpc.ServerCallHandler
+import io.grpc.ServerInterceptor
+
+import org.apache.spark.internal.Logging
+
+/**
+ * A gRPC interceptor to log RPC requests and responses. It logs the protobufs as JSON.
+ * Useful for local development. An ID is logged for each RPC so that requests and corresponding
+ * responses can be exactly matched.
+ */
+class LoggingInterceptor extends ServerInterceptor with Logging {
+
+  private val jsonPrinter = JsonFormat.printer().preservingProtoFieldNames()
+
+  private def logProto[T](description: String, message: T): Unit = {
+    message match {
+      case m: Message =>
+        logInfo(s"$description:\n${jsonPrinter.print(m)}")
+      case other =>
+        logInfo(s"$description: (Unknown message type) $other")
+    }
+  }
+
+  override def interceptCall[ReqT, RespT](
+      call: ServerCall[ReqT, RespT],
+      headers: Metadata,
+      next: ServerCallHandler[ReqT, RespT]): ServerCall.Listener[ReqT] = {
+
+    val id = Random.nextInt(Int.MaxValue) // Assign a random id for this RPC.

Review Comment:
   Build fails:
   
   ```
   [ERROR] [Error] /Users/raghu.angadi/w/spark/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:23: object util is not a member of package com.google.protobuf
   [ERROR] [Error] /Users/raghu.angadi/w/spark/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:40: not found: value JsonFormat
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1132674442


##########
connector/connect/server/pom.xml:
##########
@@ -155,6 +155,12 @@
       <version>${protobuf.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java-util</artifactId>

Review Comment:
   Thanks, done. Updated the PR.



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #40342:
URL: https://github.com/apache/spark/pull/40342#discussion_r1130638704


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/LoggingInterceptor.scala:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.connect.service
+
+import scala.util.Random
+
+import com.google.protobuf.Message
+import com.google.protobuf.util.JsonFormat
+import io.grpc.ForwardingServerCall.SimpleForwardingServerCall
+import io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener
+import io.grpc.Metadata
+import io.grpc.ServerCall
+import io.grpc.ServerCallHandler
+import io.grpc.ServerInterceptor
+
+import org.apache.spark.internal.Logging
+
+/**
+ * A gRPC interceptor to log RPC requests and responses. It logs the protobufs as JSON.
+ * Useful for local development. An ID is logged for each RPC so that requests and corresponding
+ * responses can be exactly matched.
+ */
+class LoggingInterceptor extends ServerInterceptor with Logging {
+
+  private val jsonPrinter = JsonFormat.printer().preservingProtoFieldNames()
+
+  private def logProto[T](description: String, message: T): Unit = {
+    message match {
+      case m: Message =>
+        logInfo(s"$description:\n${jsonPrinter.print(m)}")
+      case other =>
+        logInfo(s"$description: (Unknown message type) $other")
+    }
+  }
+
+  override def interceptCall[ReqT, RespT](
+      call: ServerCall[ReqT, RespT],
+      headers: Metadata,
+      next: ServerCallHandler[ReqT, RespT]): ServerCall.Listener[ReqT] = {
+
+    val id = Random.nextInt(Int.MaxValue) // Assign a random id for this RPC.

Review Comment:
   Should we change to use `UUID`? I think it has less conflict probability than `Random.nextInt`
   
   



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rangadi commented on pull request #40342: [SPARK-42721][CONNECT] RPC logging interceptor

Posted by "rangadi (via GitHub)" <gi...@apache.org>.
rangadi commented on PR #40342:
URL: https://github.com/apache/spark/pull/40342#issuecomment-1464952775

   @dongjoon-hyun thank you! I should have checked. missed it.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org