charliec05 opened a new pull request, #58535: URL: https://github.com/apache/spark/pull/58535
### What changes were proposed in this pull request? Tighten the checkpoint directory scan so it accepts only file names consisting of `part-` followed by one or more ASCII digits. The existing numeric ordering and contiguous partition validation remain unchanged. Add a regression test that creates a valid checkpoint, adds `part-00000.bak`, `part-backup`, and `part-` files, and verifies that the checkpoint can still be recovered. ### Why are the changes needed? `ReliableCheckpointRDD.getPartitions` currently accepts every name starting with `part-` and then parses the suffix as an integer. Leftover or externally created files such as `part-00000.bak` therefore cause an unhelpful `NumberFormatException` and make an otherwise valid checkpoint unreadable. Spark's own checkpoint files always use a numeric suffix. Ignoring non-numeric names avoids that failure without changing validation for malformed numeric checkpoint layouts. ### Does this PR introduce _any_ user-facing change? Yes. Reading a checkpoint directory now ignores non-numeric `part-*` files. Numeric checkpoint files continue to be validated for the expected names and contiguous partition sequence. ### How was this patch tested? Added a regression test and ran: `build/sbt "core/Test/testOnly org.apache.spark.CheckpointStorageSuite"` All 9 tests passed. Also ran `dev/lint-scala`; Scalastyle and Scalafmt passed. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (GPT-5) -- 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]
