<@U0A71G31CDV> I'm runniing the Starrocks cluster ...
# questions-and-troubleshooting
g
@Rocky I'm runniing the Starrocks cluster in 3.5.17 in K8S, using the starrocs-operator. What is the recommended way to upgrade to 4.0.11 and then 4.1.X ?
r
To upgrade your StarRocks cluster from 3.5.17 to 4.0.11 and then to 4.1.x using the StarRocks Operator, follow this recommended path and procedure. 1. Recommended Upgrade Path StarRocks recommends upgrading consecutively through minor versions. Since you are already on the 3.5.x branch, your path is: * Step 1: Upgrade from 3.5.17 to 4.0.11. * Step 2: Upgrade from 4.0.11 to 4.1.x. Important Warnings: * Version 4.1.0 Caution: There is a known issue with the v4.1.0 container image where BE processes may fail to start reliably. It is recommended to skip 4.1.0 and upgrade directly to v4.1.1 or later once available. * Downgrade Restriction: Once you upgrade to 4.1, you cannot downgrade to any 4.0 version earlier than 4.0.6 due to internal metadata changes. ────────── 2. Preparation (Before Each Minor Upgrade) Before moving between minor versions (e.g., 3.5 $\rightarrow$ 4.0): 1. Backup Metadata: Run the following SQL to ensure a fresh metadata checkpoint is created:
Copy code
sql
    ALTER SYSTEM CREATE IMAGE;
Wait for the image to synchronize to all Follower FEs (check
fe.log
for "push image... successful" or verify via
SHOW FRONTENDS
). 2. Disable Tablet Balancing: To prevent instability during rolling restarts:
Copy code
sql
    ADMIN SET FRONTEND CONFIG ("tablet_sched_max_scheduling_tablets" = "0");
    ADMIN SET FRONTEND CONFIG ("tablet_sched_max_balancing_tablets" = "0");
    ADMIN SET FRONTEND CONFIG ("disable_balance" = "true");
────────── 3. Upgrade Procedure (Using Operator) The StarRocks Operator handles the rolling upgrade. You must upgrade BEs/CNs first, followed by FEs. A. Upgrade BEs (and CNs if applicable) Apply the new image to the BE spec in your
StarRocksCluster
resource:
Copy code
bash
kubectl patch starrockscluster <your-cluster-name> --type='merge' \
-p '{"spec":{"starRocksBeSpec":{"image":"starrocks/be-ubuntu:4.0.11"}}}'
Wait for all BE pods to restart and reach the
Running
state. B. Upgrade FEs Update the FE image. The operator will upgrade Follower FEs first and the Leader FE last:
Copy code
bash
kubectl patch starrockscluster <your-cluster-name> --type='merge' \
-p '{"spec":{"starRocksFeSpec":{"image":"starrocks/fe-ubuntu:4.0.11"}}}'
C. Verify and Repeat 1. Check the status of the cluster and pods:
Copy code
bash
    kubectl get pods
    kubectl get starrockscluster
2. Once 4.0.11 is stable, repeat the same steps (Patching $\rightarrow$ BEs $\rightarrow$ FEs) to move to the 4.1.x version. ────────── 4. Post-Upgrade After the upgrade is complete and verified, re-enable tablet balancing:
Copy code
sql
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_scheduling_tablets" = "2000"); -- or your previous value
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_balancing_tablets" = "100");    -- or your previous value
ADMIN SET FRONTEND CONFIG ("disable_balance" = "false");
Note: Ensure your StarRocks Operator is updated to a version that supports 4.x features (ideally v1.9.x or later) before starting the cluster upgrade. Referencesdeployment/sr_operator.mddeployment/upgrade.md