xuanyuanking commented on a change in pull request #24173:
URL: https://github.com/apache/spark/pull/24173#discussion_r460363515



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala
##########
@@ -509,4 +549,3 @@ object StateStore extends Logging {
     }
   }
 }
-

Review comment:
       nit for the last empty line.

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala
##########
@@ -391,10 +399,18 @@ object StateStore extends Logging {
     require(version >= 0)
     val storeProvider = loadedProviders.synchronized {
       startMaintenanceIfNeeded()
+
+      val newProvIdSchemaCheck = 
StateStoreProviderId.withNoPartitionInformation(storeProviderId)
+      if (!schemaValidated.contains(newProvIdSchemaCheck)) {

Review comment:
       Seems we should check `stateSchemaCheckEnabled` here. Then if it's 
disabled, we will not send extra RPC requests?

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala
##########
@@ -407,6 +423,12 @@ object StateStore extends Logging {
     loadedProviders.remove(storeProviderId).foreach(_.close())
   }
 
+  /** Unload all state store providers: unit test purpose */
+  private[sql] def unloadAll(): Unit = loadedProviders.synchronized {

Review comment:
       Ditto, if we eagerly check the `stateSchemaCheckEnabled` config, then 
this test specific function also can be removed and we can use the config to 
control the behavior in the 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.

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