This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 807d08e3b1 [doc] Document that `sink.use-managed-memory-allocator`
needs `write-buffer-for-append` for append tables (#11263)
807d08e3b1 is described below
commit 807d08e3b1f4c89c0981e93959edf0473e4cd1a5
Author: Junfan Zhang <[email protected]>
AuthorDate: Fri Nov 20 12:17:00 2026 +0800
[doc] Document that `sink.use-managed-memory-allocator` needs
`write-buffer-for-append` for append tables (#11263)
---
docs/docs/flink/configuration.md | 2 +-
docs/docs/maintenance/write-performance.md | 3 +++
docs/generated/flink_connector_configuration.html | 2 +-
.../main/java/org/apache/paimon/flink/FlinkConnectorOptions.java | 6 +++++-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/docs/docs/flink/configuration.md b/docs/docs/flink/configuration.md
index a5f4066a4d..62aef3e6f7 100644
--- a/docs/docs/flink/configuration.md
+++ b/docs/docs/flink/configuration.md
@@ -48,7 +48,7 @@ memory to let Flink allocate a share of the slot's managed
memory to the Paimon
| Option | Default | Meaning |
| --- | --- | --- |
-| `sink.use-managed-memory-allocator` | `false` | Use Flink managed memory for
the writer's merge tree buffers. |
+| `sink.use-managed-memory-allocator` | `false` | Use Flink managed memory for
the writer's merge tree buffers. For append-only tables, rows use it only when
`write-buffer-for-append` is also `true`; otherwise it is declared but unused. |
| `sink.managed.writer-buffer-memory` | `256 MiB` | Weight used by Flink to
allocate managed memory to the writer. The actual allocation depends on the
slot's managed memory and the operators sharing it. |
The writer-buffer setting is a **weight**, not a fixed allocation of that many
bytes.
diff --git a/docs/docs/maintenance/write-performance.md
b/docs/docs/maintenance/write-performance.md
index 44410446dc..2f5f82b398 100644
--- a/docs/docs/maintenance/write-performance.md
+++ b/docs/docs/maintenance/write-performance.md
@@ -169,6 +169,9 @@ Or you can use Flink managed memory for your write buffer
to avoid OOM, set tabl
sink.use-managed-memory-allocator=true
```
+For an append-only table, rows are buffered in managed memory only when
`write-buffer-for-append=true` is also set.
+Otherwise rows bypass the write buffer, and the managed memory declared by
this option stays unused.
+
## Commit Memory
Committer node may use a large memory if the amount of data written to the
table is particularly large, OOM may occur
diff --git a/docs/generated/flink_connector_configuration.html
b/docs/generated/flink_connector_configuration.html
index 43dd354534..1bbc16592a 100644
--- a/docs/generated/flink_connector_configuration.html
+++ b/docs/generated/flink_connector_configuration.html
@@ -348,7 +348,7 @@ under the License.
<td><h5>sink.use-managed-memory-allocator</h5></td>
<td style="word-wrap: break-word;">false</td>
<td>Boolean</td>
- <td>If true, flink sink will use managed memory for merge tree;
otherwise, it will create an independent memory allocator.</td>
+ <td>If true, flink sink will use managed memory for merge tree;
otherwise, it will create an independent memory allocator. This option selects
the allocator and declares the managed memory weight. For append-only table,
rows are buffered in managed memory only when 'write-buffer-for-append' is also
set to true; otherwise rows are written directly to the file format writers and
the managed memory stays unused.</td>
</tr>
<tr>
<td><h5>sink.writer-coordinator.cache-expire-after-access</h5></td>
diff --git
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkConnectorOptions.java
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkConnectorOptions.java
index 6c4a541846..3fe6065b5a 100644
---
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkConnectorOptions.java
+++
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkConnectorOptions.java
@@ -216,7 +216,11 @@ public class FlinkConnectorOptions {
.defaultValue(false)
.withDescription(
"If true, flink sink will use managed memory for
merge tree; otherwise, "
- + "it will create an independent memory
allocator.");
+ + "it will create an independent memory
allocator. "
+ + "This option selects the allocator and
declares the managed memory weight. "
+ + "For append-only table, rows are
buffered in managed memory only when "
+ + "'write-buffer-for-append' is also set
to true; otherwise rows are written "
+ + "directly to the file format writers and
the managed memory stays unused.");
public static final ConfigOption<Boolean> SCAN_REMOVE_NORMALIZE =
key("scan.remove-normalize")