Skip to content

Version Upgrade Notes ​

This article describes the precautions to take when upgrading; please read it carefully before proceeding with the upgrade.

Need to migrate data, skip installation ​

When the installer detects that the currently installed component versions differ from those in the upgrade package, a direct replacement upgrade is not possible.

A data migration must be performed via script before the upgrade can proceed.

When upgrading Docker or K8s deployments, do I need to handle the built-in PostgreSQL database if the image OS changes? ​

Yes. If the base OS changes between the old and new Docker or K8s images, for example from CentOS 7 to AlmaLinux 8, the underlying glibc / locale rules may also change. PostgreSQL string ordering and unique indexes depend on these rules. When the existing data directory is reused after the OS change, existing indexes may need to be rebuilt.

This applies only to environments that use the HENGSHI built-in PostgreSQL service. If an external PostgreSQL service is used, let the database administrator handle it according to the external database change procedure.

Run the following after the image upgrade is complete and before business traffic is fully restored:

  1. Back up metadb, file storage, and other required data, and schedule a maintenance window.
  2. After upgrading the images, keep the built-in PostgreSQL service reachable while keeping business services stopped or not externally available.
  3. Connect to the metadb database and run:
sql
REINDEX DATABASE hengshi;
  1. If the environment uses the built-in file upload / file storage database, connect to that database and run:
sql
REINDEX DATABASE hengshi_sense_internal_storage;
  1. After reindexing, start or reopen HENGSHI business services, then validate key reports, login, file upload, and file download.

If duplicate values already appear in fields protected by unique constraints, or saving fails with duplicate-name errors after the upgrade, stop business writes first and contact HENGSHI support to clean up the duplicate data. Running REINDEX while duplicate data still exists can fail and does not replace data cleanup.

Upgrading from Version ≤4.2 to This Version ​

  1. Metadb versions 9.x are no longer supported; confirm the Metadb version in use before upgrading.

    1. If using the HENGSHI built-in database, refer to Database Service Upgrade.
    2. If using an external database, upgrade the database yourself; version 13.xx is recommended.
  2. JDK 1.8 is no longer supported. Container and K8s deployments can ignore this; for VM single-node or cluster deployments, you must run init-os all before upgrading.

    1. In offline environments, contact support to obtain the JDK static package.
    shell
    cd /opt/hengshi/lib
    export hs_version="openjdk-11.0.17_8.1"
    wget https://download.hengshi.com/hs-jdk/${hs_version}.tar.gz
    tar -zxf ${hs_version}.tar.gz && rm ${hs_version}.tar.gz
    ln -sf ${hs_version} jdk
  3. If a specific JDK version is required, configure the following parameter in conf/hengshi-sense-env.sh:

    shell
    export HS_JDK_HOME="JDK installation directory"  # parent directory of the bin folder
  4. A built-in Doris engine is provided. If you need to use the Doris engine as the default built-in engine, refer to Doris Engine Configuration.

Roll Back to Version < 4.4 ​

  1. Version 4.4 introduces logic-level optimizations for the Greenplum engine and is incompatible with programs launched under Version < 4.4. Before performing the rollback, run the following command:
shell
cd /opt/hengshi
bin/clean_engine.sh -d true

After execution is complete, proceed with the rollback operation.

Considerations When Replacing Metadb with an External PostgreSQL Database ​

Please refer to the step "Use a super-admin account to authorize users" in the preparation section of Replacing HENGSHI Metadb.

Notes on Configuring a Secondary Path ​

This release no longer supports secondary-path access via the CONTEXT_PATH parameter.
If you need secondary-path access, please refer to Secondary Access Path Configuration.

MinIO Cleanup Notes ​

Earlier versions sometimes failed to delete images when an App was removed, leaving orphaned files in MinIO. This release adds a cleanup job that removes those unused images and improves the deletion logic while reorganizing the storage layout.

Before upgrading, complete the following preparations:

  1. Back up MinIO (including cloud environments) and the MetaDB.
  2. Wait for the cleanup job to finish during the upgrade. Monitor progress in the logs by filtering on MinioImageClean. Tests show that cleaning 11 GB of unused images takes about four minutes.

TIP

Affected versions: 4.5.4 and earlier, plus 4.6.
When upgrading from 4.6.1 to this release, the MinIO cleanup job will run; upgrades from any other version will skip it.

Modifying the Default Configuration for LDAP Authentication ​

LDAP authentication has the “sync user attributes” option disabled by default.
During an upgrade, user attributes will no longer be synchronized.
Before upgrading, confirm whether you need to synchronize user attributes; if so, set this configuration to true.

Affected versions: When upgrading from 4.5.11 and earlier, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, or 5.1.0 to the current release, verify this setting.

The default name of the session cookie is _USER_SESSION_ID; after upgrading, users must log in again.
If your system still relies on the legacy cookie name sid, update your code to use the new name _USER_SESSION_ID,
or set the parameter export SESSION_COOKIE_NAME=sid (the original cookie name).

TIP

Affected versions: 4.5.15 and earlier, 5.0.0–5.0.8, 5.1.0–5.1.4. Other versions are not impacted.

6.0+ First-Upgrade Health-Check Configuration ​

The 6.0.0 upgrade/migration can take a long time; actual duration varies with metadb size, CPU performance, and disk I/O.
Example: metadb 40 GB (75 k Dashboards, 430 k Charts), Xeon W-2191B @ 2.30 GHz, standard cloud SSD ≈ 15 min.
We recommend disabling startup health checks before the first 6.0+ major-version upgrade, then re-enabling them after the upgrade and successful startup.
Below are the modification suggestions for common deployment types:

2-1 Disable Health Check ​

[Single-node & Cluster Deployment]

Stop the monit monitoring service

shell
${HENGSHI_HOME}/bin/hengshi-sense-bin stop monit
# {HENGSHI_HOME} is the installation directory variable of HENGSHI; do not copy and execute it directly.
[Docker Deployment]

Comment out the healthcheck section under hengshi in the docker-compose file, then start the hengshi service

shell
    healthcheck:
      test: /opt/hengshi/bin/hengshi-sense-bin health hengshi
      interval: 10s
      timeout: 30s
      retries: 90
[K8s Deployment]

Comment out the following three items in the hengshi-sense deployment manifest, then start the hengshi service

  • startupProbe
  • livenessProbe
  • readinessProbe
shell
kubectl -n [namespace] edit deployment hengshi-sense
shell
          startupProbe:
            exec:
              command:
                - /bin/bash
                - /opt/hengshi/bin/hengshi-sense-bin
                - health
                - hengshi
                - single
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 90
          livenessProbe:
            exec:
              command:
                - /bin/bash
                - /opt/hengshi/bin/hengshi-sense-bin
                - health
                - hengshi
                - single
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            exec:
              command:
                - /bin/bash
                - /opt/hengshi/bin/hengshi-sense-bin
                - health
                - hengshi
                - single
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3

2-2 Post-upgrade Health Check Recovery ​

[Single-node & Cluster Deployment]

Restore the monit monitoring service

shell
${HENGSHI_HOME}/bin/hengshi-sense-bin start monit
# {HENGSHI_HOME} is the installation directory variable of HENGSHI; do not copy and execute it directly.
[Docker Deployment] & [K8s Deployment]

Uncomment the content that was commented out during the shutdown phase, then restart the hengshi service.

Version scope: first-time upgrade from any version prior to 6.0.0 to 6.0+, e.g. 4.5.x → 6.2.y, 5.4.x → 6.0.y

Systems already running 6.0+ are unaffected when performing subsequent major-version upgrades, i.e. 6.0.x → 6.1.0 is not subject to this requirement and does not need the health check disabled for the initial upgrade.

6.0+ nginx configuration update ​

Version 6.0.0 optimizes the caching logic for static assets; consequently, the reverse proxy in front of HENGSHI SENSE must be updated to cache the entry-level static files.
Take nginx as an example—add the following inside the HENGSHI SENSE server block:

conf
location ~* \.(html|htm)$ {
    add_header Cache-Control "no-store, no-cache, must-revalidate";
    add_header Pragma "no-cache";
    add_header Expires "0";
}

Complete nginx configuration reference; other proxies or cloud LBs require equivalent settings.

Version scope: upgrading from any release prior to 6.0.0 to 6.0.0+

6.1+ Backend Trace Configuration Update ​

Starting from 6.1.0, to enable APM trace data on the backend, append -Dotel.traces.exporter=otlp to the HENGSHI_JAVA_OPTS variable in the configuration file hengshi-sense-env.sh:

shell
# Example
HENGSHI_JAVA_OPTS="-Xms1g -Xmx8g -Dotel.traces.exporter=otlp"

User Manual for Hengshi Analysis Platform