HeartSaVioR commented on code in PR #42895:
URL: https://github.com/apache/spark/pull/42895#discussion_r1326687236
##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -314,6 +314,18 @@
"<details>"
]
},
+ "CANNOT_WRITE_STATE_FILE" : {
Review Comment:
How about considering symmetric name? For the base error class of failure on
loading state, we use CANNOT_LOAD_STATE_STORE. Probably better to sync between
two.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/HDFSBackedStateStoreProvider.scala:
##########
@@ -135,17 +135,15 @@ private[sql] class HDFSBackedStateStoreProvider extends
StateStoreProvider with
/** Commit all the updates that have been made to the store, and return
the new version. */
override def commit(): Long = {
- verify(state == UPDATING, "Cannot commit after already committed or
aborted")
-
try {
+ verify(state == UPDATING, "Cannot commit after already committed or
aborted")
commitUpdates(newVersion, mapToUpdate, compressedStream)
state = COMMITTED
logInfo(s"Committed version $newVersion for $this to file
$finalDeltaFile")
newVersion
} catch {
- case NonFatal(e) =>
- throw new IllegalStateException(
- s"Error committing version $newVersion into $this", e)
Review Comment:
Shall we check what is logged for `this`? Does it include more information
about state store metadata like operator ID, partition ID, storeName, etc? If
then might be better to keep 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: [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]