heye1005 commented on PR #7715:
URL: https://github.com/apache/paimon/pull/7715#issuecomment-7132575865

   > Thanks for updating the Spark regression test. I reviewed `49b107a3`. 
Checking the missing marker before filtering covers the previously reported 
data-side recomputation case. I would hold the merge for the following issues.
   > 
   > * **[P1] Keep the same snapshot input across Spark retries.** The snapshot 
RDD enumerates files inside `mapPartitions` and repartitions the results by 
iterator position. After a concurrent commit and expiration, recomputing that 
upstream shuffle can put the latest snapshot in a different partition. If Spark 
recomputes the partition that previously held it and reuses the old downstream 
map output for the new partition, the data references from the live snapshot 
can be omitted. The reads that do execute can all succeed, leaving no missing 
marker and allowing the anti-join to classify live files as orphans. I traced 
this in the Paimon lineage and Spark 3.5.9 scheduler. Please pin the snapshot 
input for the run and add a regression for upstream snapshot shuffle 
recomputation. This scenario still needs end-to-end verification. [Paimon 
snapshot 
enumeration](https://github.com/apache/paimon/blob/49b107a3afa35de24a048a263860b6e20a0489b5/paimon-spark/paimon-spark-common/src/main/scala/or
 g/apache/paimon/spark/procedure/SparkOrphanFilesClean.scala#L82-L90) · [Spark 
scheduler](https://github.com/apache/spark/blob/v3.5.9/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L2064-L2077)
   > * **[P2] Close the LOCAL executor when snapshot enumeration aborts.** A 
normal commit during enumeration can now throw an `IOException`. The LOCAL 
procedure propagates the `Future.get()` failure before reaching 
`shutdownNow()`. Repeated cleanup in a long-lived Spark or Flink process can 
leave fixed-pool workers behind. Please close the pool in `finally`. 
[Enumeration 
check](https://github.com/apache/paimon/blob/49b107a3afa35de24a048a263860b6e20a0489b5/paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java#L584-L598)
 · [LOCAL 
executor](https://github.com/apache/paimon/blob/49b107a3afa35de24a048a263860b6e20a0489b5/paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java#L354-L375)
   > * **[P2] Preserve the managed BLOB cleaner's per-table skip.** On 
`master`, `remove_orphan_blobs` calls the shared `safelyGetAllSnapshots()` 
helper. Routing it through strict enumeration can throw on a concurrent commit 
before the existing topology check can skip that table. This can fail a 
wildcard cleanup across otherwise unrelated tables. Please keep strict 
enumeration scoped to `remove_orphan_files` and preserve the existing helper 
behavior for managed BLOB cleanup. [Shared 
helper](https://github.com/apache/paimon/blob/49b107a3afa35de24a048a263860b6e20a0489b5/paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java#L261-L264)
 · [Managed BLOB topology 
check](https://github.com/apache/paimon/blob/ff1a004379c22c671c5d98acbec1f8e912e210dc/paimon-core/src/main/java/org/apache/paimon/operation/ManagedBlobOrphanFilesClean.java#L134-L148)
   > 
   > All 92 focused Core, Flink 1.20, and Spark 3.5.9 tests passed on the merge 
tree with `master` at `d7b90ecf`. That includes the Flink global abort and 
Spark data-side recomputation regressions. The licensing job failed while 
extracting Temurin 8, before it reached the licensing check. [Licensing 
job](https://github.com/apache/paimon/actions/runs/44875417241/job/136759008344)
   
   @JingsongLi hi, for P1, would you collect the snapshots on the driver so 
retries use the same list? That seems simplest to me. My only concern is driver 
memory if a table has a lot of snapshots. Having executors write the list to 
shared storage feels a bit heavy for this. Did you have another approach in 
mind?


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

Reply via email to