Copilot commented on code in PR #3463: URL: https://github.com/apache/fluss/pull/3463#discussion_r3563040359
##########
website/docs/maintenance/configuration.md:
##########
@@ -174,6 +174,9 @@ during the Fluss cluster working.
| kv.rocksdb.bloom-filter.bits-per-key | Double | 10.0
| Bits per key that bloom filter will use, this only take
effect when bloom filter is used. The default value is 10.0.
|
| kv.rocksdb.bloom-filter.block-based-mode | Boolean | false
| If true, RocksDB will use block-based filter instead of
full filter, this only take effect when bloom filter is used. The default value
is `false`.
|
| kv.rocksdb.shared-rate-limiter-bytes-per-sec | MemorySize |
Long.MAX_VALUE | The bytes per second rate limit for RocksDB
flush and compaction operations shared across all RocksDB instances on the
TabletServer. The rate limiter is always enabled. The default value is
Long.MAX_VALUE (effectively unlimited). Set to a lower value (e.g., 100MB) to
limit the rate. This configuration can be updated dynamically without server
restart. See [Updating Configs](operations/updating-configs.md) for more
details.
|
+| kv.backpressure.l0-slowdown-trigger | Integer | 8
| The L0 file count at which Fluss starts emitting proactive
backpressure signals to clients. This value should be lower than the underlying
storage engine's own L0 slowdown trigger (RocksDB
`level0_slowdown_writes_trigger`, default `20`), so that clients begin
throttling before the storage engine is forced to throttle itself. The gap
between this value and the storage trigger forms the throttle ramp-up window.
The default value is `8`.
|
+| kv.flush.thread-num | Integer | 10
| The number of threads that the server uses to asynchronously
flush primary-key table writes to RocksDB. The default value is 10. |
+| client.writer.kv-backpressure.max-throttle | Duration | 3s
| The upper bound of the per-bucket throttle delay the client
applies in response to KV backpressure signals piggybacked by the server.
Throttle delay is computed as: `max_throttle * p^2`, where `p` is the
normalized pressure in `[0, 1)` reported by the server. Once the server rejects
a write with `StorageBackpressureException`, the client also uses this value as
the initial retry backoff so that the transition between throttle and rejection
is continuous. The default value is 3 seconds. |
Review Comment:
The PR description states the client throttle uses `max_throttle_ms * p^3`
with a default of `5000ms` and a config key
`client.writer.kv-backpressure.max-throttle-ms`, but the implementation/docs in
this PR use a quadratic curve (`max_throttle * p^2`), a `Duration` key
`client.writer.kv-backpressure.max-throttle` (default `3s`), and
`kv.backpressure.l0-slowdown-trigger` default `8` (not `12`). Please align the
PR description and the shipped config/docs/defaults so users have a single
source of truth (either update the description, or adjust the
implementation/config docs to match the intended design).
##########
website/docs/maintenance/observability/monitor-metrics.md:
##########
@@ -1097,6 +1097,36 @@ These metrics use Sum aggregation to show the total
value across all tables in a
</tbody>
</table>
+### KV Backpressure
+
+KV backpressure metrics report the cooperative backpressure signal computed by
primary-key tables on top of RocksDB. These metrics are aggregated from all
buckets of a table and expose two core signals: peak intensity and cumulative
hard rejections.
+
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ <th class="text-left" style={{width: '30pt'}}>Scope</th>
+ <th class="text-left" style={{width: '150pt'}}>Infix</th>
+ <th class="text-left" style={{width: '80pt'}}>Metrics</th>
+ <th class="text-left" style={{width: '300pt'}}>Description</th>
+ <th class="text-left" style={{width: '40pt'}}>Type</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th rowspan="2"><strong>tabletserver</strong></th>
+ <td rowspan="2">table</td>
+ <td>kvBackpressureMaxPressure</td>
+ <td>Maximum normalized backpressure value across all buckets of this
table, in <code>[0, 1]</code>. A value approaching <code>1</code> indicates the
hottest bucket is close to the storage engine's hard-rejection trigger.</td>
+ <td>Gauge</td>
Review Comment:
The docs say the backpressure signal is in `[0, 1]`, but the server-side
`currentPressure()` explicitly clamps the value to `< 1` (`Math.min(...,
0.999f)`), and other comments describe the range as `[0, 1)`. To avoid
confusion for metric consumers, the documented range should be `[0, 1)`.
--
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]
