ueshin commented on code in PR #45046:
URL: https://github.com/apache/spark/pull/45046#discussion_r1480617495


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala:
##########
@@ -928,10 +929,10 @@ object SparkSession extends Logging {
      *
      * @since 3.5.0
      */
-    def config(map: Map[String, Any]): Builder = synchronized {
+    def config(map: Map[String, Any]): Builder = {
       map.foreach { kv: (String, Any) =>
         {
-          options += kv._1 -> kv._2.toString
+          options.put(kv._1, kv._2.toString)

Review Comment:
   This change seems to be a breaking change as another thread can read/write 
between each `put`, whereas can't before? How about using `putAll` instead?



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