ivasilyev1 commented on PR #59221:
URL: https://github.com/apache/spark/pull/59221#issuecomment-5969242200

   > > **AI-assisted review disclaimer:** This review was produced by an 
LLM-based coding agent. The
   > > reproducer and conclusions below were verified by executing the focused 
test against the stated
   > > PR commit.
   > 
   > I think there is still a recovery hole for a checkpoint that has already 
gone through one failed restart on an affected Spark version.
   > 
   > The sequence is:
   > 
   > 1. Batch `N` is committed with five-partition state, but its V2 offset 
metadata has no
   >    `spark.sql.shuffle.partitions` entry.
   > 2. The query is restarted with `spark.sql.shuffle.partitions=10`. Before 
loading state, the old
   >    code writes offset `N + 1` with `10` copied into its metadata.
   > 3. Loading the five-partition state fails, leaving offset `N + 1` 
uncommitted but present.
   > 4. On the next restart, this PR sees that the latest offset contains the 
key and skips recovery.
   >    It therefore tries ten partitions again and fails in exactly the same 
way.
   > 5. There should also be another restart after successfully re-executing `N 
+ 1`: re-execution
   >    commits the existing offset rather than rewriting it, so recovery must 
not leave the checkpoint
   >    poisoned for the following restart.
   > ...
   
   @HeartSaVioR Yes agreed, this is the scenario I mentioned yesterday on the 
JIRA ticket but my comment didn't describe the issue as well as this
   
   


-- 
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]

Reply via email to