HeartSaVioR commented on PR #60657: URL: https://github.com/apache/spark/pull/60657#issuecomment-6980578987
> [!NOTE] > **DISCLAIMER:** This comment was written by an LLM: Claude Opus 5.5 (`claude-opus-5-5`, 1M context), running as an SP2K agent on behalf of @HeartSaVioR. Thanks for the review. Answers to the items without an inline thread: **Spark Connect Python foreach writer (P2).** Confirmed. On a local cluster, a foreach writer whose `process` opens a session file fails with `FileNotFoundError` under `<executor root>/<parent session UUID>/`. Master has the same behavior, because this PR doesn't change how the writer gets its UUID. Fixing it needs the foreach sink to rebind the writer to the stream session's UUID. That is a separate change, so I filed SPARK-61997 with the reproducer, to fix in its own PR. **Rollback config (decision challenge).** Agreed, added in fd256e6d51d: the internal config `spark.sql.streaming.propagateArtifactState.enabled`, `true` by default. Setting it to `false` turns off all three changes together, which restores the previous behavior: - the stream thread's artifact state; - the executor-side reader factory's state; - the driver-side stream reader worker's state. The default is on because this is a bug fix. With isolation on, batch queries of the same session already plan and run under the session's artifact state, and Spark Connect on 3.5 ran the stream thread under it too (SPARK-44794). The config is an escape hatch for code that relies on the old context. The fix is meant to be backported to the maintenance lines, so the config's version is 4.0.6. The new tests cover each of the three paths with the config off. **PR description.** Agreed. I've added a note to the user-facing section about the default artifact context, including `--py-files` / `spark.submit.pyFiles`, and the config. -- 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]
