You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/25 04:47:26 UTC

[GitHub] [spark] xuanyuanking commented on a change in pull request #24173: [SPARK-27237][SS] Introduce State schema validation among query restart

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:
users@infra.apache.org



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