Forus0322 opened a new issue, #9193: URL: https://github.com/apache/hudi/issues/9193
**_Tips before filing an issue_** - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)? - Join the mailing list to engage in conversations and get faster support at [email protected]. - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly. **Describe the problem you faced** Rollback instant exception when using call rollback_to_instant. **To Reproduce** Steps to reproduce the behavior: 1. 2. 3. 4. **Expected behavior** Problem background, using Flink to write data streams, and then interrupt the task, resulting in only request and inflight in the last commit in Hudi Table. At this time, use Spark SQL to call rollback_to_instant, pass in the last completed instant, and throw "Found in-flight commits after time:******, please rollback greater commits first." exception; pass in the last inflight instant, Then throw "Commit ***** not found in Commits" exception. Problem analysis, there may be logical conflicts during rollback. Pass in a complete instant, but the instant is not the latest action; pass in an inflight instant, it will fail the complete timeline check. Therefore, when rolling back, you only need to check whether the inflight instant is in the activeTimeline, and there is no need to check whether the instant is in the completeTimeline. **Environment Description** * Hudi version : 0.13.1 * Spark version : 3.3.1 * Hive version : * Hadoop version : 3.3.0 * Storage (HDFS/S3/GCS..) : HDFS * Running on Docker? (yes/no) : no **Additional context** Add any other context about the problem here. **Stacktrace** ```Add the stacktrace of the error.``` ```log Caused by: org.apache.hudi.exception.HoodieRollbackException: Found in-flight commits after time :20230713181414894, please rollback greater commits first at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.validateRollbackCommitSequence(BaseRollbackActionExecutor.java:197) at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.doRollbackAndGetStats(BaseRollbackActionExecutor.java:219) at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.runRollback(BaseRollbackActionExecutor.java:112) at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.execute(BaseRollbackActionExecutor.java:139) at org.apache.hudi.table.HoodieSparkMergeOnReadTable.rollback(HoodieSparkMergeOnReadTable.java:201) at org.apache.hudi.client.BaseHoodieTableServiceClient.rollback(BaseHoodieTableServiceClient.java:887) ``` ```log org.apache.hudi.exception.HoodieException: Commit 20230713171512369 not found in Commits org.apache.hudi.common.table.timeline.HoodieDefaultTimeline: [20230713171006667__deltacommit__COMPLETED],[20230713171008142__deltacommit__COMPLETED],[20230713171015079__deltacommit__COMPLETED],[20230713171023384__deltacommit__COMPLETED],[20230713171027246__deltacommit__COMPLETED],[20230713171031710__deltacommit__COMPLETED],[20230713171042252__deltacommit__COMPLETED],[20230713171052719__deltacommit__COMPLETED],[20230713171100131__deltacommit__COMPLETED],[20230713171108628__deltacommit__COMPLETED],[20230713171118727__deltacommit__COMPLETED],[20230713171128761__deltacommit__COMPLETED],[20230713171138990__deltacommit__COMPLETED],[20230713171149184__deltacommit__COMPLETED],[20230713171151112__deltacommit__COMPLETED],[20230713171154805__deltacommit__COMPLETED],[20230713171203666__deltacommit__COMPLETED],[20230713171211576__deltacommit__COMPLETED],[20230713171223116__deltacommit__COMPLETED],[20230713 171230992__deltacommit__COMPLETED],[20230713171241638__deltacommit__COMPLETED],[20230713171249919__deltacommit__COMPLETED],[20230713171259158__deltacommit__COMPLETED],[20230713171305774__deltacommit__COMPLETED],[20230713171317028__deltacommit__COMPLETED],[20230713171325595__deltacommit__COMPLETED],[20230713171333940__deltacommit__COMPLETED],[20230713171337014__deltacommit__COMPLETED],[20230713171340339__deltacommit__COMPLETED],[20230713171344473__deltacommit__COMPLETED],[20230713171355431__deltacommit__COMPLETED],[20230713171400115__deltacommit__COMPLETED],[20230713171405566__deltacommit__COMPLETED],[20230713171407414__deltacommit__COMPLETED],[20230713171418601__deltacommit__COMPLETED],[20230713171423118__deltacommit__COMPLETED],[20230713171427570__deltacommit__COMPLETED],[20230713171430420__deltacommit__COMPLETED],[20230713171432929__deltacommit__COMPLETED],[20230713171439958__deltacommit__COMPLETED],[20230713171442688__deltacommit__COMPLETED],[20230713171446362__deltacommit__COMPL ETED],[20230713171448282__deltacommit__COMPLETED],[20230713171458676__deltacommit__COMPLETED],[20230713171508390__deltacommit__COMPLETED] at org.apache.spark.sql.hudi.command.procedures.RollbackToInstantTimeProcedure.call(RollbackToInstantTimeProcedure.scala:71) at org.apache.spark.sql.hudi.command.CallProcedureHoodieCommand.run(CallProcedureHoodieCommand.scala:33) at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:75) at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:73) at org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:84) at org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.$anonfun$applyOrElse$1(QueryExecution.scala:98) at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:109) ``` -- 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]
