You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/09/25 13:53:54 UTC

(datafusion-comet) 01/01: Publish built docs triggered by 570a97cce869a7f11738d43d7b179c0c9c53be7c

This is an automated email from the ASF dual-hosted git repository.

github-actions[bot] pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git

commit b8429723f8ffae804065266d6266ccb5cbc931fb
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Fri Sep 25 13:53:47 2026 +0000

    Publish built docs triggered by 570a97cce869a7f11738d43d7b179c0c9c53be7c
---
 ...id-013012468fa27c9e9fdb0a14196d357c619c68a8.svg |  2 +-
 _sources/contributor-guide/jvm_shuffle.md.txt      | 16 ++++++++++++++--
 .../contributor-guide/memory_management.md.txt     | 15 ++++++++-------
 _sources/user-guide/latest/configs.md.txt          |  5 +----
 contributor-guide/jvm_shuffle.html                 | 16 ++++++++++++++--
 contributor-guide/memory_management.html           | 14 ++++++++------
 searchindex.js                                     |  2 +-
 user-guide/latest/configs.html                     | 22 +++++-----------------
 8 files changed, 52 insertions(+), 40 deletions(-)

diff --git a/_images/mermaid-013012468fa27c9e9fdb0a14196d357c619c68a8.svg b/_images/mermaid-013012468fa27c9e9fdb0a14196d357c619c68a8.svg
index 6fe3f7764b..220959f934 100644
--- a/_images/mermaid-013012468fa27c9e9fdb0a14196d357c619c68a8.svg
+++ b/_images/mermaid-013012468fa27c9e9fdb0a14196d357c619c68a8.svg
@@ -1 +1 @@
-<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 511.73px; background-color: transparent;" viewBox="0 0 511.7299499511719 942" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg [...]
\ No newline at end of file
+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 511.73px; background-color: transparent;" viewBox="0 0 511.7299499511719 942" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg [...]
\ No newline at end of file
diff --git a/_sources/contributor-guide/jvm_shuffle.md.txt b/_sources/contributor-guide/jvm_shuffle.md.txt
index a4d0b37361..1226b4c82b 100644
--- a/_sources/contributor-guide/jvm_shuffle.md.txt
+++ b/_sources/contributor-guide/jvm_shuffle.md.txt
@@ -190,8 +190,20 @@ writes the same Arrow IPC block format as native shuffle, so direct read applies
 
 ## Memory Management
 
-- `CometShuffleMemoryAllocator`: Custom allocator for off-heap memory pages
-- Memory is allocated in pages; when allocation fails, writers spill to disk
+- `CometShuffleMemoryAllocator.getInstance` returns the allocator for the task. Pages are always
+  `Unsafe`-allocated, because their addresses are handed to native code, but what bounds them
+  depends on Spark's memory mode.
+- Off-heap mode gets `CometUnifiedShuffleMemoryAllocator`, an ordinary Spark `MemoryConsumer`
+  drawing from `spark.memory.offHeap.size`. When it cannot acquire a page the writer spills to
+  disk.
+- On-heap mode gets `CometUnboundedShuffleMemoryAllocator`, which keeps no budget and so never
+  refuses a page. Nothing bounds these allocations, and memory pressure never triggers a spill.
+  That mode exists only so the Spark SQL tests can run against Comet. See
+  [Memory Management](memory_management.md).
+- Row count still triggers spilling in either mode. `CometDiskBlockWriter` spills at
+  `min(spark.comet.shuffle.jvm.spillThreshold, spark.comet.shuffle.jvm.batchSize)`.
+  `CometShuffleExternalSorter` spills at `spark.comet.shuffle.jvm.spillThreshold` alone, which
+  defaults to `Int.MaxValue`, so on the sort path that trigger is effectively off by default.
 - `CometDiskBlockWriter` coordinates spilling across all partition writers (largest first)
 
 ## Configuration
diff --git a/_sources/contributor-guide/memory_management.md.txt b/_sources/contributor-guide/memory_management.md.txt
index daa7a0f0f6..339e8f03e7 100644
--- a/_sources/contributor-guide/memory_management.md.txt
+++ b/_sources/contributor-guide/memory_management.md.txt
@@ -26,9 +26,12 @@ anyone debugging an out-of-memory report. For user-facing tuning advice, see the
 
 This page covers off-heap mode (`spark.memory.offHeap.enabled=true`) only. Comet also has an
 on-heap mode, but it exists so that the Spark SQL test suite can run against Comet without changing
-Spark's memory configuration. It must not be used in production, and it is not described here. The
-pool types that only on-heap mode exposes belong to the `CATEGORY_TESTING` config group for the
-same reason.
+Spark's memory configuration. Comet performs no memory accounting in it: the native side gets
+DataFusion's `UnboundedMemoryPool` and the JVM shuffle allocator
+(`CometUnboundedShuffleMemoryAllocator`) hands out `Unsafe` pages against no budget. Native memory
+is not on the JVM heap, so there is no Spark pool it could honestly be charged to, and the
+fixed-size pool that used to stand in for one bounded nothing the container cares about. On-heap
+mode must not be used in production, and it is not described further here.
 
 ## Overview
 
@@ -212,9 +215,6 @@ back a slice of the off-heap pool for the memory Comet does not reserve, but it
 
 The only room Spark leaves for memory outside the pool is `spark.executor.memoryOverhead`.
 
-A second value, `memory_limit_per_task`, is computed and passed alongside it, but only the on-heap
-pool types read it.
-
 ### Resolving the pool type
 
 `parse_memory_pool_config` (`native/core/src/execution/memory_pools/config.rs`) turns the pool-type
@@ -225,7 +225,8 @@ string and the limit into a `MemoryPoolConfig`. Two pool types are valid in off-
 | `fair_unified` (default) | `memory_limit`      | Delegates to Spark's `TaskMemoryManager`; task-shared |
 | `greedy_unified`         | n/a (pool size `0`) | Spark owns the limit entirely; task-shared            |
 
-Any other pool type is rejected with a configuration error.
+Any other pool type is rejected with a configuration error. In on-heap mode the pool-type string is
+ignored and the pool is always `UnboundedMemoryPool`.
 
 ## The pool stack
 
diff --git a/_sources/user-guide/latest/configs.md.txt b/_sources/user-guide/latest/configs.md.txt
index a35b6b66b3..6d1c984164 100644
--- a/_sources/user-guide/latest/configs.md.txt
+++ b/_sources/user-guide/latest/configs.md.txt
@@ -183,15 +183,12 @@ them like any other production setting.
 | Config | Description | Default Value |
 |--------|-------------|---------------|
 | `spark.comet.debug.memory` | When enabled, log all native memory pool interactions. For more information, refer to the Comet Debugging Guide (https://datafusion.apache.org/comet/contributor-guide/debugging.html). | false |
-| `spark.comet.exec.onHeap.enabled` | Whether to allow Comet to run in on-heap mode. Required for running Spark SQL tests. It can be overridden by the environment variable `ENABLE_COMET_ONHEAP`. | false |
-| `spark.comet.exec.onHeap.memoryPool` | The type of memory pool to be used for Comet native execution when running Spark in on-heap mode. Available pool types are `greedy`, `fair_spill`, `greedy_task_shared`, `fair_spill_task_shared`, `greedy_global`, `fair_spill_global`, and `unbounded`. | greedy_task_shared |
+| `spark.comet.exec.onHeap.enabled` | Whether to allow Comet to run in on-heap mode. Required for running Spark SQL tests. Comet performs no memory accounting in on-heap mode, so its allocations are bounded by nothing; this must not be used in production. It can be overridden by the environment variable `ENABLE_COMET_ONHEAP`. | false |
 | `spark.comet.exec.respectDataFusionConfigs` | Development and testing configuration option to allow DataFusion configs set in Spark configuration settings starting with `spark.comet.datafusion.` to be passed into native execution. | false |
 | `spark.comet.iceberg.write.enabled` | Whether to delegate the executor-side Parquet write to Comet's native (iceberg-rust) writer when the table's properties allow it. Requires `spark.comet.write.iceberg.splitOperator.enabled = true`. Off by default. | false |
-| `spark.comet.memoryOverhead` | The amount of additional memory to be allocated per executor process for Comet, in MiB, when running Spark in on-heap mode. | 1024 MiB |
 | `spark.comet.parquet.write.enabled` | Whether to enable native Parquet write through Comet. When enabled, Comet will intercept Parquet write operations and execute them natively. This feature is highly experimental and only partially implemented. It should not be used in production. It can be overridden by the environment variable `ENABLE_COMET_WRITE`. | false |
 | `spark.comet.scan.csv.v2.enabled` | Whether to use the native Comet V2 CSV reader for improved performance. Default: false (uses standard Spark CSV reader) Experimental: Performance benefits are workload-dependent. | false |
 | `spark.comet.scan.enabled` | Whether to enable native scans. Intended for use in Comet's own test suites to selectively disable native scans; not intended for production use. | true |
-| `spark.comet.shuffle.jvm.memoryFactor` | Fraction of Comet memory to be allocated per executor process for JVM (columnar) shuffle when running in on-heap mode. For more information, refer to the [Comet Tuning Guide](https://datafusion.apache.org/comet/user-guide/latest/tuning.html). | 1.0 |
 | `spark.comet.testing.strict` | Experimental option to enable strict testing, which will fail tests that could be more comprehensive, such as checking for a specific fallback reason. It can be overridden by the environment variable `ENABLE_COMET_STRICT_TESTING`. | false |
 | `spark.comet.write.iceberg.splitOperator.enabled` | Whether to rewrite Iceberg V2 writes from Spark's combined V2 write/commit operator into Comet's two-operator shape: a file writer exec (inside AQE) and a committer (outside AQE). | false |
 <!-- prettier-ignore-end -->
diff --git a/contributor-guide/jvm_shuffle.html b/contributor-guide/jvm_shuffle.html
index da8db8dc9f..4fde797a83 100644
--- a/contributor-guide/jvm_shuffle.html
+++ b/contributor-guide/jvm_shuffle.html
@@ -788,8 +788,20 @@ writes the same Arrow IPC block format as native shuffle, so direct read applies
 <section id="memory-management">
 <h2>Memory Management<a class="headerlink" href="#memory-management" title="Link to this heading">#</a></h2>
 <ul class="simple">
-<li><p><code class="docutils literal notranslate"><span class="pre">CometShuffleMemoryAllocator</span></code>: Custom allocator for off-heap memory pages</p></li>
-<li><p>Memory is allocated in pages; when allocation fails, writers spill to disk</p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">CometShuffleMemoryAllocator.getInstance</span></code> returns the allocator for the task. Pages are always
+<code class="docutils literal notranslate"><span class="pre">Unsafe</span></code>-allocated, because their addresses are handed to native code, but what bounds them
+depends on Spark’s memory mode.</p></li>
+<li><p>Off-heap mode gets <code class="docutils literal notranslate"><span class="pre">CometUnifiedShuffleMemoryAllocator</span></code>, an ordinary Spark <code class="docutils literal notranslate"><span class="pre">MemoryConsumer</span></code>
+drawing from <code class="docutils literal notranslate"><span class="pre">spark.memory.offHeap.size</span></code>. When it cannot acquire a page the writer spills to
+disk.</p></li>
+<li><p>On-heap mode gets <code class="docutils literal notranslate"><span class="pre">CometUnboundedShuffleMemoryAllocator</span></code>, which keeps no budget and so never
+refuses a page. Nothing bounds these allocations, and memory pressure never triggers a spill.
+That mode exists only so the Spark SQL tests can run against Comet. See
+<a class="reference internal" href="memory_management.html"><span class="std std-doc">Memory Management</span></a>.</p></li>
+<li><p>Row count still triggers spilling in either mode. <code class="docutils literal notranslate"><span class="pre">CometDiskBlockWriter</span></code> spills at
+<code class="docutils literal notranslate"><span class="pre">min(spark.comet.shuffle.jvm.spillThreshold,</span> <span class="pre">spark.comet.shuffle.jvm.batchSize)</span></code>.
+<code class="docutils literal notranslate"><span class="pre">CometShuffleExternalSorter</span></code> spills at <code class="docutils literal notranslate"><span class="pre">spark.comet.shuffle.jvm.spillThreshold</span></code> alone, which
+defaults to <code class="docutils literal notranslate"><span class="pre">Int.MaxValue</span></code>, so on the sort path that trigger is effectively off by default.</p></li>
 <li><p><code class="docutils literal notranslate"><span class="pre">CometDiskBlockWriter</span></code> coordinates spilling across all partition writers (largest first)</p></li>
 </ul>
 </section>
diff --git a/contributor-guide/memory_management.html b/contributor-guide/memory_management.html
index 1253c26a30..ed3bdda2d2 100644
--- a/contributor-guide/memory_management.html
+++ b/contributor-guide/memory_management.html
@@ -555,9 +555,12 @@ anyone debugging an out-of-memory report. For user-facing tuning advice, see the
 <a class="reference internal" href="../user-guide/latest/tuning.html"><span class="std std-doc">Tuning Guide</span></a>.</p>
 <p>This page covers off-heap mode (<code class="docutils literal notranslate"><span class="pre">spark.memory.offHeap.enabled=true</span></code>) only. Comet also has an
 on-heap mode, but it exists so that the Spark SQL test suite can run against Comet without changing
-Spark’s memory configuration. It must not be used in production, and it is not described here. The
-pool types that only on-heap mode exposes belong to the <code class="docutils literal notranslate"><span class="pre">CATEGORY_TESTING</span></code> config group for the
-same reason.</p>
+Spark’s memory configuration. Comet performs no memory accounting in it: the native side gets
+DataFusion’s <code class="docutils literal notranslate"><span class="pre">UnboundedMemoryPool</span></code> and the JVM shuffle allocator
+(<code class="docutils literal notranslate"><span class="pre">CometUnboundedShuffleMemoryAllocator</span></code>) hands out <code class="docutils literal notranslate"><span class="pre">Unsafe</span></code> pages against no budget. Native memory
+is not on the JVM heap, so there is no Spark pool it could honestly be charged to, and the
+fixed-size pool that used to stand in for one bounded nothing the container cares about. On-heap
+mode must not be used in production, and it is not described further here.</p>
 <section id="overview">
 <h2>Overview<a class="headerlink" href="#overview" title="Link to this heading">#</a></h2>
 <p>A Comet executor has to satisfy three separate memory budgets at once, and they are enforced by
@@ -767,8 +770,6 @@ running, and the tasks together can still acquire the whole pool.</p></li>
 with no Comet limit at all.</p></li>
 </ul>
 <p>The only room Spark leaves for memory outside the pool is <code class="docutils literal notranslate"><span class="pre">spark.executor.memoryOverhead</span></code>.</p>
-<p>A second value, <code class="docutils literal notranslate"><span class="pre">memory_limit_per_task</span></code>, is computed and passed alongside it, but only the on-heap
-pool types read it.</p>
 <section id="resolving-the-pool-type">
 <h3>Resolving the pool type<a class="headerlink" href="#resolving-the-pool-type" title="Link to this heading">#</a></h3>
 <p><code class="docutils literal notranslate"><span class="pre">parse_memory_pool_config</span></code> (<code class="docutils literal notranslate"><span class="pre">native/core/src/execution/memory_pools/config.rs</span></code>) turns the pool-type
@@ -792,7 +793,8 @@ string and the limit into a <code class="docutils literal notranslate"><span cla
 </tbody>
 </table>
 </div>
-<p>Any other pool type is rejected with a configuration error.</p>
+<p>Any other pool type is rejected with a configuration error. In on-heap mode the pool-type string is
+ignored and the pool is always <code class="docutils literal notranslate"><span class="pre">UnboundedMemoryPool</span></code>.</p>
 </section>
 </section>
 <section id="the-pool-stack">
diff --git a/searchindex.js b/searchindex.js
index cbf9449b25..73847cd6f0 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"!": [[56, "id1"]], "%": [[54, "id1"]], "&": [[44, "id1"]], "*": [[54, "id2"]], "+": [[54, "id3"]], "-": [[54, "id4"]], "/": [[54, "id5"]], "1. Format Your Code": [[41, "format-your-code"]], "1. Install Comet": [[62, "install-comet"], [74, "install-comet"]], "1. Native Operators (nativeExecs map)": [[28, "native-operators-nativeexecs-map"]], "2. Build and Verify": [[41, "build-and-verify"]], "2. Clone Iceberg and Apply Diff": [[62, "clone-iceberg-and-apply- [...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"!": [[56, "id1"]], "%": [[54, "id1"]], "&": [[44, "id1"]], "*": [[54, "id2"]], "+": [[54, "id3"]], "-": [[54, "id4"]], "/": [[54, "id5"]], "1. Format Your Code": [[41, "format-your-code"]], "1. Install Comet": [[62, "install-comet"], [74, "install-comet"]], "1. Native Operators (nativeExecs map)": [[28, "native-operators-nativeexecs-map"]], "2. Build and Verify": [[41, "build-and-verify"]], "2. Clone Iceberg and Apply Diff": [[62, "clone-iceberg-and-apply- [...]
\ No newline at end of file
diff --git a/user-guide/latest/configs.html b/user-guide/latest/configs.html
index 09dd4764dd..7acb0a959c 100644
--- a/user-guide/latest/configs.html
+++ b/user-guide/latest/configs.html
@@ -1200,25 +1200,17 @@ them like any other production setting.</p>
 <td><p>false</p></td>
 </tr>
 <tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.exec.onHeap.enabled</span></code></p></td>
-<td><p>Whether to allow Comet to run in on-heap mode. Required for running Spark SQL tests. It can be overridden by the environment variable <code class="docutils literal notranslate"><span class="pre">ENABLE_COMET_ONHEAP</span></code>.</p></td>
+<td><p>Whether to allow Comet to run in on-heap mode. Required for running Spark SQL tests. Comet performs no memory accounting in on-heap mode, so its allocations are bounded by nothing; this must not be used in production. It can be overridden by the environment variable <code class="docutils literal notranslate"><span class="pre">ENABLE_COMET_ONHEAP</span></code>.</p></td>
 <td><p>false</p></td>
 </tr>
-<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.exec.onHeap.memoryPool</span></code></p></td>
-<td><p>The type of memory pool to be used for Comet native execution when running Spark in on-heap mode. Available pool types are <code class="docutils literal notranslate"><span class="pre">greedy</span></code>, <code class="docutils literal notranslate"><span class="pre">fair_spill</span></code>, <code class="docutils literal notranslate"><span class="pre">greedy_task_shared</span></code>, <code class="docutils literal notranslate"><span class="pre">fair_spill_task_shared</span></code> [...]
-<td><p>greedy_task_shared</p></td>
-</tr>
-<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.exec.respectDataFusionConfigs</span></code></p></td>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.exec.respectDataFusionConfigs</span></code></p></td>
 <td><p>Development and testing configuration option to allow DataFusion configs set in Spark configuration settings starting with <code class="docutils literal notranslate"><span class="pre">spark.comet.datafusion.</span></code> to be passed into native execution.</p></td>
 <td><p>false</p></td>
 </tr>
-<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.iceberg.write.enabled</span></code></p></td>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.iceberg.write.enabled</span></code></p></td>
 <td><p>Whether to delegate the executor-side Parquet write to Comet’s native (iceberg-rust) writer when the table’s properties allow it. Requires <code class="docutils literal notranslate"><span class="pre">spark.comet.write.iceberg.splitOperator.enabled</span> <span class="pre">=</span> <span class="pre">true</span></code>. Off by default.</p></td>
 <td><p>false</p></td>
 </tr>
-<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.memoryOverhead</span></code></p></td>
-<td><p>The amount of additional memory to be allocated per executor process for Comet, in MiB, when running Spark in on-heap mode.</p></td>
-<td><p>1024 MiB</p></td>
-</tr>
 <tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.parquet.write.enabled</span></code></p></td>
 <td><p>Whether to enable native Parquet write through Comet. When enabled, Comet will intercept Parquet write operations and execute them natively. This feature is highly experimental and only partially implemented. It should not be used in production. It can be overridden by the environment variable <code class="docutils literal notranslate"><span class="pre">ENABLE_COMET_WRITE</span></code>.</p></td>
 <td><p>false</p></td>
@@ -1231,15 +1223,11 @@ them like any other production setting.</p>
 <td><p>Whether to enable native scans. Intended for use in Comet’s own test suites to selectively disable native scans; not intended for production use.</p></td>
 <td><p>true</p></td>
 </tr>
-<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.shuffle.jvm.memoryFactor</span></code></p></td>
-<td><p>Fraction of Comet memory to be allocated per executor process for JVM (columnar) shuffle when running in on-heap mode. For more information, refer to the <a class="reference external" href="https://datafusion.apache.org/comet/user-guide/latest/tuning.html">Comet Tuning Guide</a>.</p></td>
-<td><p>1.0</p></td>
-</tr>
-<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.testing.strict</span></code></p></td>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.testing.strict</span></code></p></td>
 <td><p>Experimental option to enable strict testing, which will fail tests that could be more comprehensive, such as checking for a specific fallback reason. It can be overridden by the environment variable <code class="docutils literal notranslate"><span class="pre">ENABLE_COMET_STRICT_TESTING</span></code>.</p></td>
 <td><p>false</p></td>
 </tr>
-<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.write.iceberg.splitOperator.enabled</span></code></p></td>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">spark.comet.write.iceberg.splitOperator.enabled</span></code></p></td>
 <td><p>Whether to rewrite Iceberg V2 writes from Spark’s combined V2 write/commit operator into Comet’s two-operator shape: a file writer exec (inside AQE) and a committer (outside AQE).</p></td>
 <td><p>false</p></td>
 </tr>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org