yihua commented on code in PR #11740:
URL: https://github.com/apache/hudi/pull/11740#discussion_r1712027802
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -1018,6 +1018,11 @@ class HoodieSparkSqlWriterInternal {
val metaSyncSuccess = metaSync(spark,
HoodieWriterUtils.convertMapToHoodieConfig(parameters),
tableInstantInfo.basePath, schema)
+ if (!metaSyncSuccess && commitSuccess) {
+ log.error("Metadata sync operation failed, rolling back current
commit")
+ client.rollback(tableInstantInfo.instantTime)
Review Comment:
I don't think rollback should be done if meta sync has failure. Hudi is
designed in a way that transaction and meta sync are decoupled. User can read
a table through the base path with or without meta / catalog sync
--
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]