docs: correct the plugin and shuffle sections of the plugin overview - #6197
Conversation
The plugin overview said the plugin has no executor-side component and that it updates executor memory configuration. CometExecutorPlugin was added in apache#4734, and apache#6054 removed the spark.executor.memoryOverhead adjustment. Describe what the driver and executor plugins do now, and note that most tests register the session extension directly, so the driver plugin's steps do not run for them.
The Shuffle Writes section said a shuffle always needs one native plan to produce the input and another to write it. Since apache#4507 the native shuffle writer runs the child's native operators and the writer in one plan. The Shuffle Reads section described decoding with ArrowReaderIterator, which the shuffle reader no longer uses: blocks are decoded in native code, inside the consuming native plan by default. Describe both shuffle implementations and link to the native and JVM shuffle guides.
sunchao
left a comment
There was a problem hiding this comment.
Summary
- Prior state and problem:
plugin_overview.mdincorrectly described executor plugins, automatic memory configuration, separate native shuffle plans, and JVM IPC decoding. - Design approach: Updates the overview to match current code and links to the detailed shuffle and tuning guides.
- Correctness / compatibility analysis: Verified the changed claims against plugin initialization, shutdown, shuffle writers, reader dispatch, and native decoding. Checked SparkContext/SparkSession initialization ordering against Spark 3.4.3, 3.5.9, 4.0.4, 4.1.3, and 4.2.0 sources. No introduced P1/P2 issues found within this review.
- Key design decisions: Clearly distinguishes native and JVM columnar shuffle, including the JVM-input fallback. Links keep implementation detail in the existing subsystem guides without adding abstraction or complexity.
- Implementation sketch: Both commits change only
docs/source/contributor-guide/plugin_overview.md. The description matchesPlugins.scala,CometNativeShuffleWriter, and the direct-read and JNI-decoding paths. - Behavioral changes worth calling out: Documentation only. No execution behavior, compatibility, or runtime overhead changes.
- Suggested improvements: None at P1/P2 severity.
Reviewed the full diff from 67803a7a422c44de07af1e5d25c1dbeae8df68d4 to 3fb3d159878bc9777fda0d837e68f85852ad70d9. Confirmed non-draft status. The snapshot and live discussion endpoints contained no reviews, issue comments, inline comments, or review threads.
Routed skills: review-comet-pr, review-comet-shuffle-pr, and review-comet-memory-pr.
Exact-head CI: 7 checks passed and 15 were skipped, with no failures or unfinished checks. Preflight passed Markdown formatting and Mermaid validation. Runtime suites and documentation deployment were skipped.
Validation limits: Local git diff --check and checks of all five added links and their anchors passed. Sphinx and Prettier were unavailable locally, so no local documentation build or formatting run was performed. No runtime suites were run for this documentation-only diff. The checkout remains unchanged.
|
Thanks @sunchao |
Which issue does this PR close?
No issue was filed. This is a small documentation correction found while checking what
CometDriverPluginstill does after #6054.Rationale for this change
The contributor guide's plugin overview makes four claims that are no longer true:
CometPluginhas providedCometExecutorPluginsince feat: release tokio runtime on driver/executor exit #4734, which uses it to shut down the native tokio runtime when an executor stops.SparkConfwith the extra configuration provided by Comet, such as executor memory configuration." fix: remove the ineffective spark.executor.memoryOverhead adjustment from the driver plugin #6054 removed thespark.executor.memoryOverheadadjustment, and the plugin no longer changes any executor memory setting.ArrowReaderIteratorto process the blocks using Arrow'sStreamReaderfor decoding IPC batches." It no longer does. Shuffle blocks are decoded in native code, inside the consuming native plan by default.What changes are included in this PR?
The "Comet SQL Plugin" section now describes what the plugin does today:
CometDriverPluginruns before anySparkSessionexists, which is what lets it set static configuration.spark.comet.version, then stops with a warning unlessspark.memory.offHeap.enabledorspark.comet.exec.onHeap.enabledistrue.spark.comet.metrics.enabled=true, and logs warnings for problem settings such as an unsetspark.executor.memoryOverhead.In the "Shuffle" section:
How are these changes tested?
This is a documentation-only change. Each statement was checked against the code.
prettier --checkpasses on the page, and a Sphinx build ofdocs/sourceproduces no warnings from it.