This is an automated email from the ASF dual-hosted git repository.
ipolyzos pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git
The following commit(s) were added to refs/heads/main by this push:
new bb7635605 Make controlled shutdown parameters configurable (#1830)
bb7635605 is described below
commit bb76356057465a6801231bd6bc2ac0d1f4b4fd78
Author: Hemanth Savasere <[email protected]>
AuthorDate: Mon Oct 20 12:15:49 2025 +0530
Make controlled shutdown parameters configurable (#1830)
* feat(tablet-server): make controlled shutdown parameters configurable
Add configuration options for tablet server controlled shutdown retry
behavior:
- tablet-server.controlled-shutdown.max-retries
- tablet-server.controlled-shutdown.retry-interval
Update documentation and add tests to verify the new configuration options
work as expected
* add configurations in docs
---------
Co-authored-by: Hemanth <[email protected]>
Co-authored-by: ipolyzos <[email protected]>
---
.../org/apache/fluss/config/ConfigOptions.java | 20 ++++
fluss-dist/src/main/resources/server.yaml | 4 +
.../apache/fluss/server/tablet/TabletServer.java | 12 +--
.../server/tablet/TabletServerShutdownITCase.java | 30 ++++++
website/docs/maintenance/configuration.md | 107 +++++++++++----------
.../maintenance/operations/graceful-shutdown.md | 20 +++-
6 files changed, 131 insertions(+), 62 deletions(-)
diff --git
a/fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java
b/fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java
index 9f812d5d4..6c75ff3c9 100644
--- a/fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java
+++ b/fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java
@@ -418,6 +418,26 @@ public class ConfigOptions {
+ WRITER_ID_EXPIRATION_TIME.key()
+ " passing. The default value is 10
minutes.");
+ public static final ConfigOption<Integer>
TABLET_SERVER_CONTROLLED_SHUTDOWN_MAX_RETRIES =
+ key("tablet-server.controlled-shutdown.max-retries")
+ .intType()
+ .defaultValue(3)
+ .withDescription(
+ "The maximum number of retries for controlled
shutdown of the tablet server. "
+ + "During controlled shutdown, the tablet
server attempts to transfer leadership "
+ + "of its buckets to other servers. If the
transfer fails, it will retry up to "
+ + "this number of times before proceeding
with shutdown. The default value is 3.");
+
+ public static final ConfigOption<Duration>
TABLET_SERVER_CONTROLLED_SHUTDOWN_RETRY_INTERVAL =
+ key("tablet-server.controlled-shutdown.retry-interval")
+ .durationType()
+ .defaultValue(Duration.ofMillis(1000))
+ .withDescription(
+ "The interval between retries during controlled
shutdown of the tablet server. "
+ + "When controlled shutdown fails to
transfer bucket leadership, the tablet server "
+ + "will wait for this duration before
attempting the next retry. "
+ + "The default value is 1000 milliseconds
(1 second).");
+
public static final ConfigOption<Integer> BACKGROUND_THREADS =
key("server.background.threads")
.intType()
diff --git a/fluss-dist/src/main/resources/server.yaml
b/fluss-dist/src/main/resources/server.yaml
index f079b71f9..24352ceb2 100644
--- a/fluss-dist/src/main/resources/server.yaml
+++ b/fluss-dist/src/main/resources/server.yaml
@@ -65,6 +65,10 @@ bind.listeners: FLUSS://localhost:9123
# when running multiple tablet servers.
tablet-server.id: 0
+# Controlled shutdown configuration for tablet servers
+# tablet-server.controlled-shutdown.max-retries: 3
+# tablet-server.controlled-shutdown.retry-interval: 1000ms
+
#==============================================================================
# OSS FileSystem
#==============================================================================
diff --git
a/fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletServer.java
b/fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletServer.java
index e08635428..7c02f993c 100644
---
a/fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletServer.java
+++
b/fluss-server/src/main/java/org/apache/fluss/server/tablet/TabletServer.java
@@ -85,10 +85,6 @@ public class TabletServer extends ServerBase {
private static final Logger LOG =
LoggerFactory.getLogger(TabletServer.class);
- // TODO, maybe need to make it configurable
- private static final int CONTROLLED_SHUTDOWN_MAX_RETRIES = 3;
- private static final long CONTROLLED_SHUTDOWN_RETRY_INTERVAL_MS = 1000L;
-
private final int serverId;
/**
@@ -452,7 +448,11 @@ public class TabletServer extends ServerBase {
// a period of time and try again for a number of retries. If all the
attempt fails, we
// simply force the shutdown.
boolean shutdownSucceeded = false;
- int remainingRetries = CONTROLLED_SHUTDOWN_MAX_RETRIES;
+ int remainingRetries =
+
conf.getInt(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_MAX_RETRIES);
+ long retryIntervalMs =
+
conf.get(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_RETRY_INTERVAL).toMillis();
+
while (!shutdownSucceeded && remainingRetries > 0) {
remainingRetries--;
@@ -484,7 +484,7 @@ public class TabletServer extends ServerBase {
if (!shutdownSucceeded && remainingRetries > 0) {
try {
- Thread.sleep(CONTROLLED_SHUTDOWN_RETRY_INTERVAL_MS);
+ Thread.sleep(retryIntervalMs);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
break;
diff --git
a/fluss-server/src/test/java/org/apache/fluss/server/tablet/TabletServerShutdownITCase.java
b/fluss-server/src/test/java/org/apache/fluss/server/tablet/TabletServerShutdownITCase.java
index 2102df6d1..68ec0d911 100644
---
a/fluss-server/src/test/java/org/apache/fluss/server/tablet/TabletServerShutdownITCase.java
+++
b/fluss-server/src/test/java/org/apache/fluss/server/tablet/TabletServerShutdownITCase.java
@@ -18,6 +18,7 @@
package org.apache.fluss.server.tablet;
import org.apache.fluss.config.ConfigOptions;
+import org.apache.fluss.config.Configuration;
import org.apache.fluss.exception.RetriableException;
import org.apache.fluss.metadata.Schema;
import org.apache.fluss.metadata.TableBucket;
@@ -112,6 +113,35 @@ public class TabletServerShutdownITCase {
FLUSS_CLUSTER_EXTENSION.startTabletServer(leader, true);
}
+ @Test
+ void testControlledShutdownConfiguration() throws Exception {
+ // Test that the controlled shutdown configuration options are
properly loaded
+ Configuration conf = new Configuration();
+
+ // Verify default values are loaded correctly
+
assertThat(conf.getInt(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_MAX_RETRIES))
+ .isEqualTo(3);
+ assertThat(
+
conf.get(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_RETRY_INTERVAL)
+ .toMillis())
+ .isEqualTo(1000L);
+
+ // Test custom configuration values
+ Configuration customConf = new Configuration();
+
customConf.set(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_MAX_RETRIES, 5);
+ customConf.set(
+ ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_RETRY_INTERVAL,
+ Duration.ofMillis(2000));
+
+
assertThat(customConf.getInt(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_MAX_RETRIES))
+ .isEqualTo(5);
+ assertThat(
+ customConf
+
.get(ConfigOptions.TABLET_SERVER_CONTROLLED_SHUTDOWN_RETRY_INTERVAL)
+ .toMillis())
+ .isEqualTo(2000L);
+ }
+
@Test
void testControlledShutdown() throws Exception {
FLUSS_CLUSTER_EXTENSION.assertHasTabletServerNumber(3);
diff --git a/website/docs/maintenance/configuration.md
b/website/docs/maintenance/configuration.md
index 0737fdf0e..4b8d07bb0 100644
--- a/website/docs/maintenance/configuration.md
+++ b/website/docs/maintenance/configuration.md
@@ -52,38 +52,41 @@ during the Fluss cluster working.
## CoordinatorServer
-| Option | Type | Default | Description
|
-| ------------------------ | ------- | -------
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| coordinator.io-pool.size | Integer | 10 | The size of the IO thread
pool to run blocking operations for coordinator server. This includes discard
unnecessary snapshot files. Increase this value if you experience slow
unnecessary snapshot files clean. The default value is 10. |
+| Option | Type | Default | Description
|
+|--------------------------|---------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| coordinator.io-pool.size | Integer | 10 | The size of the IO thread
pool to run blocking operations for coordinator server. This includes discard
unnecessary snapshot files. Increase this value if you experience slow
unnecessary snapshot files clean. The default value is 10. |
+
## TabletServer
-| Option | Type | Default |
Description
[...]
-|--------------------------------------------|------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[...]
-| tablet-server.id | Integer | (None) |
The id for the tablet server.
[...]
-| tablet-server.rack | String | (None) |
The rack for the TabletServer. This will be used in rack aware bucket
assignment for fault tolerance. Examples: `RACK1`, `cn-hangzhou-server10`
[...]
-| data.dir | String | /tmp/fluss-data |
This configuration controls the directory where Fluss will store its data. The
default value is /tmp/fluss-data
[...]
-| server.writer-id.expiration-time | Duration | 7d |
The time that the tablet server will wait without receiving any write request
from a client before expiring the related status. The default value is 7 days.
[...]
-| server.writer-id.expiration-check-interval | Duration | 10min |
The interval at which to remove writer ids that have expired due to
`server.writer-id.expiration-time passing. The default value is 10 minutes.
[...]
-| server.background.threads | Integer | 10 |
The number of threads to use for various background processing tasks. The
default value is 10.
[...]
-| server.buffer.memory-size | MemorySize | 256mb |
The total bytes of memory the server can use, e.g, buffer write-ahead-log rows.
[...]
-| server.buffer.page-size | MemorySize | 128kb |
Size of every page in memory buffers (`server.buffer.memory-size`).
[...]
-| server.buffer.per-request-memory-size | MemorySize | 16mb |
The minimum number of bytes that will be allocated by the writer rounded down
to the closest multiple of server.buffer.page-size. It must be greater than or
equal to server.buffer.page-size. This option allows to allocate memory in
batches to have better CPU-cached friendliness due to contiguous segments.
[...]
-| server.buffer.wait-timeout | Duration | 2^(63)-1ns |
Defines how long the buffer pool will block when waiting for segments.
[...]
+| Option | Type | Default
| Description
|
+|--------------------------------------------------|------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| tablet-server.id | Integer | (None)
| The id for the tablet server.
|
+| tablet-server.rack | String | (None)
| The rack for the TabletServer. This will be used in rack aware bucket
assignment for fault tolerance. Examples: `RACK1`, `cn-hangzhou-server10`
|
+| data.dir | String |
/tmp/fluss-data | This configuration controls the directory where Fluss will
store its data. The default value is /tmp/fluss-data
|
+| server.writer-id.expiration-time | Duration | 7d
| The time that the tablet server will wait without receiving any write
request from a client before expiring the related status. The default value is
7 days.
|
+| server.writer-id.expiration-check-interval | Duration | 10min
| The interval at which to remove writer ids that have expired due to
`server.writer-id.expiration-time passing. The default value is 10 minutes.
|
+| server.background.threads | Integer | 10
| The number of threads to use for various background processing tasks. The
default value is 10.
|
+| server.buffer.memory-size | MemorySize | 256mb
| The total bytes of memory the server can use, e.g, buffer write-ahead-log
rows.
|
+| server.buffer.page-size | MemorySize | 128kb
| Size of every page in memory buffers (`server.buffer.memory-size`).
|
+| server.buffer.per-request-memory-size | MemorySize | 16mb
| The minimum number of bytes that will be allocated by the writer rounded
down to the closest multiple of server.buffer.page-size. It must be greater
than or equal to server.buffer.page-size. This option allows to allocate memory
in batches to have better CPU-cached friendliness due to contiguous segments. |
|
+| server.buffer.wait-timeout | Duration | 2^(63)-1ns
| Defines how long the buffer pool will block when waiting for segments.
|
+| tablet-server.controlled-shutdown.max-retries | Integer | 3
| Maximum number of attempts to transfer leadership before proceeding with
an unclean shutdown during a controlled shutdown procedure.
|
+| tablet-server.controlled-shutdown.retry-interval | Duration | 1000ms
| Time interval between retry attempts when trying to transfer leadership
during controlled shutdown.
|
## Zookeeper
-| Option | Type | Default |
Description
[...]
-|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[...]
-| zookeeper.address | String | (None) | The
ZooKeeper address to use, when running Fluss with ZooKeeper.
[...]
-| zookeeper.path.root | String | /fluss | The
root path under which Fluss stores its entries in ZooKeeper.
[...]
-| zookeeper.client.session-timeout | Duration | 60s |
Defines the session timeout for the ZooKeeper session in ms.
[...]
-| zookeeper.client.connection-timeout | Duration | 15s |
Defines the connection timeout for ZooKeeper in ms.
[...]
-| zookeeper.client.retry-wait | Duration | 5s |
Defines the pause between consecutive retries in ms.
[...]
-| zookeeper.client.max-retry-attempts | Integer | 3 |
Defines the number of connection retries before the client gives up.
[...]
-| zookeeper.client.tolerate-suspended-connections | Boolean | false |
Defines whether a suspended ZooKeeper connection will be treated as an error
that causes the leader information to be invalidated or not. In case you set
this option to %s, Fluss will wait until a ZooKeeper connection is marked as
lost before it revokes the leadership of components. This has the effect that
Fluss is more resilient against temporary connection instabilities at the cost
of running more likely into tim [...]
+| Option | Type | Default |
Description
[...]
+|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[...]
+| zookeeper.address | String | (None) | The
ZooKeeper address to use, when running Fluss with ZooKeeper.
[...]
+| zookeeper.path.root | String | /fluss | The
root path under which Fluss stores its entries in ZooKeeper.
[...]
+| zookeeper.client.session-timeout | Duration | 60s |
Defines the session timeout for the ZooKeeper session in ms.
[...]
+| zookeeper.client.connection-timeout | Duration | 15s |
Defines the connection timeout for ZooKeeper in ms.
[...]
+| zookeeper.client.retry-wait | Duration | 5s |
Defines the pause between consecutive retries in ms.
[...]
+| zookeeper.client.max-retry-attempts | Integer | 3 |
Defines the number of connection retries before the client gives up.
[...]
+| zookeeper.client.tolerate-suspended-connections | Boolean | false |
Defines whether a suspended ZooKeeper connection will be treated as an error
that causes the leader information to be invalidated or not. In case you set
this option to %s, Fluss will wait until a ZooKeeper connection is marked as
lost before it revokes the leadership of components. This has the effect that
Fluss is more resilient against temporary connection instabilities at the cost
of running more likely into tim [...]
| zookeeper.client.ensemble-tracker | Boolean | true |
Defines whether Curator should enable ensemble tracker. This can be useful in
certain scenarios in which CuratorFramework is accessing to ZK clusters via
load balancer or Virtual IPs. Default Curator EnsembleTracking logic watches
`CuratorEventType.GET_CONFIG` events and changes ZooKeeper connection string.
It is not desired behaviour when ZooKeeper is running under the Virtual IPs.
Under certain configurations Ense [...]
-| zookeeper.client.config-path | String | (None) | The
file path from which the ZooKeeper client reads its configuration. This allows
each ZooKeeper client instance to load its own configuration file, instead of
relying on shared JVM-level environment settings. This enables fine-grained
control over ZooKeeper client behavior.
[...]
-| zookeeper.client.max-inflight-requests | String | 100 | The
maximum number of unacknowledged requests the client will send to ZooKeeper
before blocking.
[...]
+| zookeeper.client.config-path | String | (None) | The
file path from which the ZooKeeper client reads its configuration. This allows
each ZooKeeper client instance to load its own configuration file, instead of
relying on shared JVM-level environment settings. This enables fine-grained
control over ZooKeeper client behavior.
[...]
+| zookeeper.client.max-inflight-requests | String | 100 | The
maximum number of unacknowledged requests the client will send to ZooKeeper
before blocking.
[...]
## Netty
@@ -127,33 +130,33 @@ during the Fluss cluster working.
## Kv
-| Option | Type | Default
| Description
[...]
-|---------------------------------------------------|------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[...]
-| kv.snapshot.interval | Duration | 10min
| The interval to perform periodic snapshot for kv data. The
default setting is 10 minutes.
[...]
-| kv.snapshot.scheduler-thread-num | Integer | 1
| The number of threads that the server uses to schedule
snapshot kv data for all the replicas in the server.
[...]
-| kv.snapshot.transfer-thread-num | Integer | 4
| The number of threads the server uses to transfer (download
and upload) kv snapshot files.
[...]
-| kv.snapshot.num-retained | Integer | 1
| The maximum number of completed snapshots to retain.
[...]
-| kv.rocksdb.thread.num | Integer | 2
| The maximum number of concurrent background flush and
compaction jobs (per bucket of table). The default value is `2`.
[...]
-| kv.rocksdb.files.open | Integer | -1
| The maximum number of open files (per bucket of table)
that can be used by the DB, `-1` means no limit. The default value is `-1`.
[...]
-| kv.rocksdb.log.max-file-size | MemorySize | 25mb
| The maximum size of RocksDB's file used for information
logging. If the log files becomes larger than this, a new file will be created.
If 0, all logs will be written to one log file. The default maximum file size
is `25MB`.
[...]
-| kv.rocksdb.log.file-num | Integer | 4
| The maximum number of files RocksDB should keep for
information logging (Default setting: 4).
[...]
-| kv.rocksdb.log.dir | String |
`${FLUSS_HOME}/log/rocksdb` | The directory for RocksDB's
information logging files. If empty (Fluss default setting), log files will be
in the same directory as the Fluss log. If non-empty, this directory will be
used and the data directory's absolute path will be used as the prefix of the
log file name. If setting this option as a non-existing location, e.g
`/dev/null`, RocksDB will then create the log und [...]
-| kv.rocksdb.log.level | Enum | INFO_LEVEL
| The specified information logging level for RocksDB.
Candidate log level is `DEBUG_LEVEL`, `INFO_LEVEL`, `WARN_LEVEL`,
`ERROR_LEVEL`, `FATAL_LEVEL`, `HEADER_LEVEL`, NUM_INFO_LOG_LEVELS, . If unset,
Fluss will use INFO_LEVEL. Note: RocksDB info logs will not be written to the
Fluss's tablet server logs and there is no rolling strategy, unless you
configure `kv.rocksdb.log.dir`, `kv.rocksdb.l [...]
-| kv.rocksdb.write-batch-size | MemorySize | 2mb
| The max size of the consumed memory for RocksDB batch
write, will flush just based on item count if this config set to 0.
[...]
-| kv.rocksdb.compaction.style | Enum | LEVEL
| The specified compaction style for DB. Candidate compaction
style is LEVEL, FIFO, UNIVERSAL, or NONE, and Fluss chooses `LEVEL` as default
style.
[...]
-| kv.rocksdb.compaction.level.use-dynamic-size | Boolean | false
| If true, RocksDB will pick target size of each level
dynamically. From an empty DB, RocksDB would make last level the base level,
which means merging L0 data into the last level, until it exceeds
max_bytes_for_level_base. And then repeat this process for second last level
and so on. The default value is `false`. For more information, please refer to
RocksDB's [doc](https://github.com/facebo [...]
+| Option | Type | Default
| Description
[...]
+|---------------------------------------------------|------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[...]
+| kv.snapshot.interval | Duration | 10min
| The interval to perform periodic snapshot for kv data. The
default setting is 10 minutes.
[...]
+| kv.snapshot.scheduler-thread-num | Integer | 1
| The number of threads that the server uses to schedule
snapshot kv data for all the replicas in the server.
[...]
+| kv.snapshot.transfer-thread-num | Integer | 4
| The number of threads the server uses to transfer (download
and upload) kv snapshot files.
[...]
+| kv.snapshot.num-retained | Integer | 1
| The maximum number of completed snapshots to retain.
[...]
+| kv.rocksdb.thread.num | Integer | 2
| The maximum number of concurrent background flush and
compaction jobs (per bucket of table). The default value is `2`.
[...]
+| kv.rocksdb.files.open | Integer | -1
| The maximum number of open files (per bucket of table)
that can be used by the DB, `-1` means no limit. The default value is `-1`.
[...]
+| kv.rocksdb.log.max-file-size | MemorySize | 25mb
| The maximum size of RocksDB's file used for information
logging. If the log files becomes larger than this, a new file will be created.
If 0, all logs will be written to one log file. The default maximum file size
is `25MB`.
[...]
+| kv.rocksdb.log.file-num | Integer | 4
| The maximum number of files RocksDB should keep for
information logging (Default setting: 4).
[...]
+| kv.rocksdb.log.dir | String |
`${FLUSS_HOME}/log/rocksdb` | The directory for RocksDB's information logging
files. If empty (Fluss default setting), log files will be in the same
directory as the Fluss log. If non-empty, this directory will be used and the
data directory's absolute path will be used as the prefix of the log file name.
If setting this option as a non-existing location, e.g `/dev/null`, RocksDB
will then create the log under its own d [...]
+| kv.rocksdb.log.level | Enum | INFO_LEVEL
| The specified information logging level for RocksDB.
Candidate log level is `DEBUG_LEVEL`, `INFO_LEVEL`, `WARN_LEVEL`,
`ERROR_LEVEL`, `FATAL_LEVEL`, `HEADER_LEVEL`, NUM_INFO_LOG_LEVELS, . If unset,
Fluss will use INFO_LEVEL. Note: RocksDB info logs will not be written to the
Fluss's tablet server logs and there is no rolling strategy, unless you
configure `kv.rocksdb.log.dir`, `kv.rocksdb.l [...]
+| kv.rocksdb.write-batch-size | MemorySize | 2mb
| The max size of the consumed memory for RocksDB batch
write, will flush just based on item count if this config set to 0.
[...]
+| kv.rocksdb.compaction.style | Enum | LEVEL
| The specified compaction style for DB. Candidate compaction
style is LEVEL, FIFO, UNIVERSAL, or NONE, and Fluss chooses `LEVEL` as default
style.
[...]
+| kv.rocksdb.compaction.level.use-dynamic-size | Boolean | false
| If true, RocksDB will pick target size of each level
dynamically. From an empty DB, RocksDB would make last level the base level,
which means merging L0 data into the last level, until it exceeds
max_bytes_for_level_base. And then repeat this process for second last level
and so on. The default value is `false`. For more information, please refer to
RocksDB's [doc](https://github.com/facebo [...]
| kv.rocksdb.compression.per.level | Enum |
LZ4,LZ4,LZ4,LZ4,LZ4,ZSTD,ZSTD | A comma-separated list of Compression Type.
Different levels can have different compression policies. In many cases, lower
levels use fast compression algorithms, while higher levels with more data use
slower but more effective compression algorithms. The N th element in the List
corresponds to the compression type of the level N-1 When
`kv.rocksdb.compaction.level.use-dynamic-size` is true [...]
-| kv.rocksdb.compaction.level.target-file-size-base | MemorySize | 64mb
| The target file size for compaction, which determines a
level-1 file size. The default value is `64MB`.
[...]
-| kv.rocksdb.compaction.level.max-size-level-base | MemorySize | 256mb
| The upper-bound of the total size of level base files in
bytes. The default value is `256MB`.
[...]
-| kv.rocksdb.writebuffer.size | MemorySize | 64mb
| The amount of data built up in memory (backed by an
unsorted log on disk) before converting to a sorted on-disk files. The default
writebuffer size is `64MB`.
[...]
-| kv.rocksdb.writebuffer.count | Integer | 2
| The maximum number of write buffers that are built up in
memory. The default value is `2`.
[...]
-| kv.rocksdb.writebuffer.number-to-merge | Integer | 1
| The minimum number of write buffers that will be merged
together before writing to storage. The default value is `1`.
[...]
-| kv.rocksdb.block.blocksize | MemorySize | 4kb
| The approximate size (in bytes) of user data packed per
block. The default blocksize is `4KB`.
[...]
-| kv.rocksdb.block.cache-size | MemorySize | 8mb
| The amount of the cache for data blocks in RocksDB. The
default block-cache size is `8MB`.
[...]
-| kv.rocksdb.use-bloom-filter | Boolean | true
| If true, every newly created SST file will contain a Bloom
filter. It is enabled by default.
[...]
-| 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.recover.log-record-batch.max-size | MemorySize | 16mb
| The max fetch size for fetching log to apply to kv during
recovering kv.
[...]
+| kv.rocksdb.compaction.level.target-file-size-base | MemorySize | 64mb
| The target file size for compaction, which determines a
level-1 file size. The default value is `64MB`.
[...]
+| kv.rocksdb.compaction.level.max-size-level-base | MemorySize | 256mb
| The upper-bound of the total size of level base files in
bytes. The default value is `256MB`.
[...]
+| kv.rocksdb.writebuffer.size | MemorySize | 64mb
| The amount of data built up in memory (backed by an
unsorted log on disk) before converting to a sorted on-disk files. The default
writebuffer size is `64MB`.
[...]
+| kv.rocksdb.writebuffer.count | Integer | 2
| The maximum number of write buffers that are built up in
memory. The default value is `2`.
[...]
+| kv.rocksdb.writebuffer.number-to-merge | Integer | 1
| The minimum number of write buffers that will be merged
together before writing to storage. The default value is `1`.
[...]
+| kv.rocksdb.block.blocksize | MemorySize | 4kb
| The approximate size (in bytes) of user data packed per
block. The default blocksize is `4KB`.
[...]
+| kv.rocksdb.block.cache-size | MemorySize | 8mb
| The amount of the cache for data blocks in RocksDB. The
default block-cache size is `8MB`.
[...]
+| kv.rocksdb.use-bloom-filter | Boolean | true
| If true, every newly created SST file will contain a Bloom
filter. It is enabled by default.
[...]
+| 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.recover.log-record-batch.max-size | MemorySize | 16mb
| The max fetch size for fetching log to apply to kv during
recovering kv.
[...]
## Metrics
diff --git a/website/docs/maintenance/operations/graceful-shutdown.md
b/website/docs/maintenance/operations/graceful-shutdown.md
index 7a183c3a5..cb20bcae2 100644
--- a/website/docs/maintenance/operations/graceful-shutdown.md
+++ b/website/docs/maintenance/operations/graceful-shutdown.md
@@ -69,8 +69,20 @@ kill -TERM <tablet-server-pid>
#### Configuration Options
-- **Controlled Shutdown Retries**: Number of attempts to transfer leadership
(`default:` 3 retries)
-- **Retry Interval**: Time between retry attempts (`default`: 1000L)
+The controlled shutdown process can be configured using the following options:
+
+- **`tablet-server.controlled-shutdown.max-retries`**: Maximum number of
attempts to transfer leadership before proceeding with unclean shutdown
(default: 3)
+- **`tablet-server.controlled-shutdown.retry-interval`**: Time interval
between retry attempts (default: 1000ms)
+
+**Example Configuration:**
+
+```yaml
+# server.yaml
+tablet-server:
+ controlled-shutdown:
+ max-retries: 5
+ retry-interval: 2000ms
+```
## Monitoring Shutdown
@@ -110,8 +122,8 @@ Monitor shutdown-related metrics:
| Configuration | Description | Default |
|---------------|-------------|---------|
-| `controlled.shutdown.max.retries` | Maximum retries for controlled shutdown
| 3 |
-| `controlled.shutdown.retry.interval.ms` | Interval between retry attempts |
5000 |
+| `tablet-server.controlled-shutdown.max-retries` | Maximum retries for
controlled shutdown | 3 |
+| `tablet-server.controlled-shutdown.retry-interval` | Interval between retry
attempts | 1000ms |
| `shutdown.timeout.ms` | General shutdown timeout | 30000 |
## See Also