You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Spark] Appends from separate applications overwrite each other's files #30
Appending to the same table from two Spark applications silently replaces the first application's files.
Repro
Run spark.range(10).write().format("vortex").mode("append").save(path) in one application, stop it, and run the same in a second application. Reading path returns 10 rows, not 20.
Why
Files are named part-<partition>-<taskId>.vortex (VortexDataWriterFactory.createWriter, PartitionedVortexDataWriter.createWriterForPartition). Task ids restart at 0 in every application, so the second job's part-00000-0.vortex overwrites the first one's in place. The same happens between two partitions' writers in different applications, and between concurrent applications writing to one path.
Impact
Any table appended to by more than one application run, like a scheduled daily append, keeps only the latest run's files wherever names repeat. No error is raised.
Fix
Put the query's unique id in the file name, as Spark does (part-00000-<uuid>-c000). LogicalWriteInfo.queryId() gives one per write. Keep the task id too, so retried attempts of one task still write different files (#22 relies on that).
Resolved by the Spark FileFormat connector merged in #35. File naming and publication use Spark commit-protocol handling. VortexWriteCommitTest.appendsFromSeparateApplicationsKeepBothRuns covers partitioned and unpartitioned output across separate Spark applications, and appendsFromSeparateApplicationsWithTheVersionTwoCommitterKeepBothRuns covers committer algorithm 2. The write-lifecycle evaluation in #31 also records both appends being retained. Confirmed against develop abb4830 by source and existing regression inspection; no tests were rerun for this audit.
Activity
ChristopherWirt commentedon Nov 2, 2026
Resolved by the Spark FileFormat connector merged in #35. File naming and publication use Spark commit-protocol handling. VortexWriteCommitTest.appendsFromSeparateApplicationsKeepBothRuns covers partitioned and unpartitioned output across separate Spark applications, and appendsFromSeparateApplicationsWithTheVersionTwoCommitterKeepBothRuns covers committer algorithm 2. The write-lifecycle evaluation in #31 also records both appends being retained. Confirmed against develop abb4830 by source and existing regression inspection; no tests were rerun for this audit.