Closed dengn closed 1 year ago
how to implement:
mo_ctl stop
to stop any running mo-service first before up upgrading in order to avoid any potential data loss. mo_ctl watchdog disable
is also required in order to avoid watchdog keeping mo-service alive.commitid
is valid, if yes continue, otherwise exit 1cp ${MO_PATH}/matrixone ${MO_PATH}/matrixone-bk-${current_time}
(maybe we can ignore logs
folder since it might be too large?). in case any operations to be performed below go wrong, delete the original folder(maybe expect logs
) and restore the backup folder to originalgit
actions like git fecth -all
, get pull
, etc to update mo codes to specified commit idbuild_mo_service
and build_mo_dump
to rebuild mo-service
and mo-dump
mo_ctl start
to restart mo-service and mo_ctl watchdog enable
to enable watchdog keeping mo-service alivetesting
also, use mo_ctl upgrade latest
will upgrade mo to latest commit id, in case the latest id is unknown to user
Test done, currently support upgrade as below:
mo_ctl upgrade help
Usage : mo_ctl upgrade [version_or_commitid] # upgrade or downgrade mo from current version to a target commit id or stable version
[commitid] : a commit id such as '38888f7', or a stable version such as '0.8.0'
: use 'latest' to upgrade to latest commit on main branch if you don't know the id
e.g. : mo_ctl upgrade 38888f7 # upgrade/downgrade to commit id 38888f7 on main branch
: mo_ctl upgrade latest # upgrade/downgrade to latest commit on main branch
: mo_ctl upgrade 0.8.0 # upgrade/downgrade to stable version 0.8.0
Is there an existing issue for the feature request?
Feature Description
upgrade from a commit number to another, or a stable version to another.
It calls git to upgrade the code base.
Feature Implementation
No response
Additional information
No response