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 scripts before the upgrade can proceed.
- Using the HENGSHI SENSE built-in database (metadb), refer to Database Service Upgrade
- Using the HENGSHI SENSE built-in object storage (minio), refer to Object Storage Service Upgrade
Upgrading from Version ≤4.2 to This Version
Metadb versions 9.x are no longer supported; confirm the Metadb version before upgrading.
- If using HENGSHI’s built-in database, refer to Database Service Upgrade.
- If using an external database, upgrade it yourself; version 13.xx is recommended.
JDK 1.8 is no longer supported. For container or K8s deployments this step can be skipped; for VM single-node or cluster deployments you must run
init-os allbefore upgrading.- In offline environments, contact support to obtain the JDK static package.
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- Note: If a specific JDK version is required, configure the following in
conf/hengshi-sense-env.sh:
export HS_JDK_HOME="JDK installation directory" # parent directory of the bin folder- A built-in Doris engine is provided. If you need to use Doris as the default built-in engine, refer to Doris Engine Configuration.
Roll Back to Version < 4.4
- 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:
cd /opt/hengshi
bin/clean_engine.sh -d trueAfter completion, proceed with the rollback operation.
Notes on Using an External PostgreSQL Database Instead of Metadb
Please refer to the step "Use a superuser account to grant permissions to 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:
- Back up MinIO (including cloud deployments) and the MetaDB.
- 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 orphaned images takes roughly 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 task 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.
Notes on Renaming the Session Cookie Default
The default name of the session cookie is _USER_SESSION_ID; after upgrading, users must log in again.
If your customer’s system still relies on the former cookie name sid, update the code to use the new name _USER_SESSION_ID,
or set the parameter export SESSION_COOKIE_NAME=sid (the original cookie name).
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 takes 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.
Before the first 6.0+ major upgrade, disable startup health checks; re-enable them only after the upgrade and successful startup.
Below are modification suggestions for common deployment types:
2-1 Disable Health Checks
[Single-node & Cluster Deployment]
Stop the monit monitoring service
${HENGSHI_HOME}/bin/hengshi-sense-bin stop monit
# {HENGSHI_HOME} is the installation directory variable for HENGSHI; do not copy and execute it directly.[Docker Deployment]
Comment out the healthcheck section under hengshi in the docker-compose file, then restart the hengshi service
healthcheck:
test: /opt/hengshi/bin/hengshi-sense-bin health hengshi
interval: 10s
timeout: 30s
retries: 90[Kubernetes Deployment]
Comment out the following three probes in the hengshi-sense deployment manifest, then restart the hengshi service
- startupProbe
- livenessProbe
- readinessProbe
kubectl -n [namespace] edit deployment hengshi-sense 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: 32-2 Post-upgrade Health Check Recovery
[Single-node & Cluster Deployment]
Restore the monit monitoring service
${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 disabled during the shutdown phase, then restart the hengshi service
Version scope: first-time upgrade from any release 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 upgrading to another major version, i.e. 6.0.x → 6.1.0 is not subject to this requirement; there is no need to disable the health check for the initial upgrade.
6.0+ nginx configuration changes
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:
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 need equivalent settings.
Version impact: upgrades from versions prior to 6.0.0 to 6.0.0+
6.2+ k8s Deployment Notes
Upgrading from 6.1 to 6.2 or later
Starting from 6.2, the k8s configuration package includes hengshi-rbac.yaml, which grants the default ServiceAccount namespaces/get permission. You must complete the following two steps during upgrade, otherwise the hengshi container will fail due to insufficient permissions.
1. Replace the namespace placeholder
# Replace __HENGSHI_NAMESPACE__ with the actual namespace name
sed -i 's/__HENGSHI_NAMESPACE__/<namespace>/' hengshi-rbac.yaml2. Apply the RBAC configuration
kubectl -n <namespace> apply -f hengshi-rbac.yamlTIP
hengshi-rbac.yaml is located inside the k8s configuration package of the target version. For the full deployment procedure, see Kubernetes Deployment Guide.
7.0+ JDBC Driver Externalization
Affected versions: 4.x/5.x/6.x → 7.0+
Starting in 7.0, all JDBC drivers live in object storage. A major-version upgrade must use an installation package or image that includes the bundled JDBC drivers. Do not use a package/image without bundled drivers. Happy path: start MinIO before business services. Platform Flyway publishes the factory drivers on the first 7.0 business start. Do not run driverctl migrate before start.
Key points:
- If the driver store is uninitialized, wait until MinIO is ready before starting
hengshi. Flyway writes factory drivers to object storage; nodes then sync the local cache. - A standard first install should also use a package with bundled JDBC drivers; a package without them fails on empty object storage.
- If
HENGSHI_JDBC_CONFIGis still set: the JSON and its jar directories must be readable when the business process starts (existing conf /.env/ ConfigMap and volumes already on the business container). Remove the variable only after the first successful 7.0 business start and custom data sources work. Do not drop those business-side volumes early. - If Flyway fails (business does not start): stop business, keep MinIO running, then use the manual
driverctl migratein the per-deployment page. - If Flyway succeeded (factory drivers are already in object storage) but custom drivers are missing: do not restart hoping it will catch up, and do not use
migrateto overwrite. Follow JDBC Driver Management anddriverctl import.
| Deployment | Procedure |
|---|---|
| VM (standalone) | Standalone upgrade · JDBC |
| Ansible (cluster) | Cluster upgrade · JDBC |
| Docker | Docker upgrade · JDBC |
| Kubernetes | Kubernetes upgrade · JDBC |
| Windows | Windows upgrade · JDBC |
Day-to-day commands: JDBC Driver Management.