Dennis Bjørn Christensen
09/29/2026, 9:02 AMRocky
09/29/2026, 9:02 AMPublishVersionDaemon attempts to reach it. If these RPC calls hang or error out (e.g., Unable to validate object), it can block the transaction commit pipeline, causing a cluster-wide drop in throughput.
2. Recovery (Stale Connection Pool): When the CN process restarts on the same IP/port, the FE's internal BrpcProxy and ThriftConnectionPool often contain sockets that were established with the old process.
* The 2-3 minute window of failure usually matches the default brpc_min_evictable_idle_time_ms (120,000ms), during which the FE may continue trying to reuse these "zombie" connections before they are evicted from the pool.
* The THRIFT_EAGAIN errors and THRIFT_RPC_ERROR are symptoms of the FE or other CNs attempting to communicate via these invalid sessions.
Recommended Restart Procedure
To avoid this impact, you should manually drain the CN before stopping it. This informs the FE to stop scheduling tasks (and ideally clears metadata tasks) before the process disappears.
1. Manually Blacklist the CN:
Find the ComputeNodeId from SHOW COMPUTE NODES, then run:
sql
ADD COMPUTE NODE BLACKLIST <ComputeNodeId>;
This prevents the FE from sending new query fragments to this node.
2. Wait for Drain:
Wait ~30 seconds to 1 minute to ensure in-flight queries finish. You can monitor the CPU or active fragments on that specific CN.
3. Perform Graceful Stop:
bash
sh stop_cn.sh -g
The -g (graceful) flag is still useful here to let any remaining background tasks finish cleanly.
4. Restart and Restore:
Once the CN is back and its heartbeat is healthy, remove it from the blacklist:
sql
DELETE COMPUTE NODE BLACKLIST <ComputeNodeId>;
Recommended Configuration Changes
To shorten the "degradation window" and make the connection pools more aggressive at recovering from restarts, consider adjusting these FE configurations:
* Shorten bRPC Stale Connection Window:
Lower the idle time before connections are evicted. In `fe.conf`:
properties
# Default is 120000 (2 minutes). Setting to 20-30s helps clear stale pools faster.
brpc_min_evictable_idle_time_ms = 30000
* Increase Publish Version Concurrency:
In shared-data mode, ensure the FE has enough threads to handle publish tasks so that one failing node doesn't block the entire daemon:
properties
# Ensure this is high enough (default is usually 512 in 3.5)
lake_publish_version_max_threads = 512
* Thrift RPC Timeout:
If the PublishVersionDaemon is taking too long to fail on the dead node, you can tune the Thrift timeout (though use caution as this affects all FE-to-CN/BE Thrift calls):
properties
# Default is 10000 (10s).
thrift_rpc_timeout_ms = 5000
Note: If you are running on Kubernetes, ensure your terminationGracePeriodSeconds is longer than the loop_count_wait_fragments_finish (default 20s) in the CN config to prevent the orchestrator from SIGKILLing the process before StarRocks finishes its internal graceful shutdown.
References
• administration/management/FE_configuration.md
• administration/management/BE_blacklist.mdDennis Bjørn Christensen
09/30/2026, 6:55 AMRocky
09/30/2026, 6:55 AMShardID to S3 Path.
* The Lock: During the "Proactively add shard" phase, Starlet often holds a global lock on the StarletFileSystem instance or the ShardManager metadata map. Any Lake I/O (reads or writes) that arrives while this map is being aggressively updated by the "burst" of shard additions will block on this lock.
* The 180s Release: This is not a single timeout but the time it takes for the CN to finish the initial "Shard Report/Sync" loop with the StarMgr (on the FE). Starlet workers have a "ready" state; until the initial batch of shards is synchronized and the first full worker report is acknowledged by the FE leader, the storage interface may gate new I/O to prevent consistency issues.
* Thundering Herd: The reason everything releases in 300ms is that the lock is finally dropped once the shard-addition burst finishes and the worker state transitions to "Ready."
2. S3/Object Storage Settings in 3.5.20
When object_storage_request_timeout_ms = -1, StarRocks uses the defaults of the underlying C++ AWS SDK.
* Request Timeout: The SDK default is often infinite (0) or extremely high (300s). For S3-compatible backends, having this set to -1 can lead to the "hang" you see if the network layer is waiting on a socket that the SDK hasn't timed out yet.
* Recommendation:
properties
# Set a concrete timeout to allow StarRocks to retry/fail faster
object_storage_request_timeout_ms = 30000 # 30 seconds
object_storage_connect_timeout_ms = 2000 # 2 seconds
# Control the retry ceiling
starlet_fslib_s3client_retry_max_attempts = 3
3. Is Shard Sync blocking?
Yes. The "Proactively add shard" process is essentially a mass-metadata load. In 3.5.20, if you have a large number of tablets/shards, the sequential nature of processing these (even in batches) can bottleneck the CN.
* There is a known issue where the CN is technically "Alive" (heartbeat works) but "Not Ready" (storage sync incomplete).
* Relevant setting: You can speed this up by increasing the metadata handling threads (if available in your specific build):
starlet_shard_mgr_worker_thread_num (Default is 8-16).
4. Metrics to monitor on :8040/metrics
To distinguish between Starlet-internal hangs and Object Store hangs:
* `starrocks_be_starlet_worker_shard_count`: Watch this during the 180s. If it's climbing, the node is still "Syncing."
* `starrocks_be_fslib_s3_single_upload_latency_count`: If this is 0 during the hang, the requests haven't even reached the S3 client yet (they are stuck in the Starlet lock).
* `starrocks_be_fslib_alive_fs_instances_count`: Should be > 0.
* `starrocks_be_lake_publish_version_latency`: Will show high values for the queued tasks.
5. Known Issue and Blacklist Syntax
* Blacklist Syntax: In 3.5.20, the grammar uses the word BACKEND even for Compute Nodes. Use:
sql
ALTER SYSTEM ADD BACKEND BLACKLIST "ip:heartbeat_port";
(Verify the port using SHOW COMPUTE NODES, usually 9050).
* Known Issue: This "Restart Degradation" is a known pain point in 3.x shared-data clusters.
* 3.5.6 vs 3.5.20: 3.5.20 is significantly newer and contains more fixes than 3.5.6. However, the architectural "sync before ready" behavior remains.
* The Fix: The best mitigation is the Draining/Blacklisting procedure.
Recommended Maintenance Workflow
1. Blacklist the CN: ALTER SYSTEM ADD BACKEND BLACKLIST "ip:9050";
2. Wait 60s: Allow the FE to route all new fragments away and let existing ones finish.
3. Restart: stop_cn.sh -g and start.Rocky
09/30/2026, 6:55 AMstarrocks_be_starlet_worker_shard_count metric to stabilize (reach its expected total).
5. Un-blacklist: ALTER SYSTEM DROP BACKEND BLACKLIST "ip:9050";
This ensures the CN does not receive queries until its internal Starlet "Gate" is open.
References
• administration/management/BE_configuration.md
• administration/management/FE_configuration.mdKevin Cai
10/01/2026, 3:47 AM