<@U0A71G31CDV> what are steps to downgrade from 4....
# questions-and-troubleshooting
a
@Rocky what are steps to downgrade from 4.1.4 to 4.0.14?
r
Downgrading from StarRocks v4.1.4 to v4.0.14 is a supported minor version downgrade because your target version (v4.0.14) is higher than v4.0.6, which is the minimum required version for downgrades from the v4.1 branch. Due to internal data layout and metadata changes introduced in v4.1 (such as tablet splitting and distribution mechanisms), downgrading to any version earlier than v4.0.6 is not supported and will cause metadata incompatibility. Phase 1: Compatibility & Preparation Before starting, ensure all schema change jobs are completed and disable the cluster's balancing tasks to prevent data movement during the process. 1. Check Schema Changes: Ensure no
ALTER TABLE
jobs are running.
Copy code
sql
    SHOW PROC '/jobs/<db_name>/schema_change';
2. Disable Tablet Balancing:
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");
    ADMIN SET FRONTEND CONFIG ("disable_colocate_balance" = "true");
3. Create Metadata Snapshot: This ensures the Leader FE saves the latest state before the downgrade.
Copy code
sql
    ALTER SYSTEM CREATE IMAGE;
Verify the image is created and synchronized to other FEs by checking the
fe.log
for a "push image... successful" message.
Phase 2: Downgrade FE (Frontends) You must downgrade Follower FEs first, then the Leader FE. 1. Stop the FE node:
Copy code
bash
    cd <fe_dir>/fe
    ./bin/stop_fe.sh
2. Replace Binaries: Replace the
bin
,
lib
, and
spark-dpp
directories with those from the v4.0.14 package.
Copy code
bash
    # Backup current folders
    mv lib lib.bak && mv bin bin.bak && mv spark-dpp spark-dpp.bak
    # Copy v4.0.14 folders
    cp -r /path/to/StarRocks-4.0.14/fe/lib .
    cp -r /path/to/StarRocks-4.0.14/fe/bin .
    cp -r /path/to/StarRocks-4.0.14/fe/spark-dpp .
3. Start the FE node:
Copy code
bash
    ./bin/start_fe.sh --daemon
4. Verify: Check
fe.log
to ensure the FE joined the cluster. Repeat for all Followers, then the Leader. Phase 3: Downgrade BE/CN (Backends/Compute Nodes) Once FEs are stable on v4.0.14, proceed with the BE/CN nodes one by one. 1. Stop the BE/CN node:
Copy code
bash
    ./bin/stop_be.sh # or stop_cn.sh --graceful
2. Replace Binaries: Replace
bin
and
lib
with v4.0.14 versions (similar to the FE step). 3. Start the node:
Copy code
bash
    ./bin/start_be.sh --daemon
Phase 4: Post-Downgrade Once the entire cluster is running v4.0.14 and all nodes show as
Alive
in
SHOW FRONTENDS
and `SHOW BACKENDS`: 1. Re-enable Balancing:
Copy code
sql
    ADMIN SET FRONTEND CONFIG ("tablet_sched_max_scheduling_tablets" = "10000");
    ADMIN SET FRONTEND CONFIG ("tablet_sched_max_balancing_tablets" = "500");
    ADMIN SET FRONTEND CONFIG ("disable_balance" = "false");
    ADMIN SET FRONTEND CONFIG ("disable_colocate_balance" = "false");
Troubleshooting * Metadata Incompatibility: If an FE fails to restart with an
UNKNOWN Operation Type
error, you may need to temporarily set
metadata_ignore_unknown_operation_type = true
in
fe.conf
, restart, create a new image via
ALTER SYSTEM CREATE IMAGE
, and then remove the setting. References • release_notes/release-4.0.md • deployment/downgrade.md • release_notes/release-3.3.md