private boolean isValidMngStatusChange(BrokerConfEntity newEntity,
            BrokerConfEntity curEntity,
            StringBuilder strBuff,
            ProcessResult result) {
        if (newEntity.getManageStatus() == curEntity.getManageStatus()) {
            return true;
        }
        if (((newEntity.getManageStatus().getCode() < ManageStatus.STATUS_MANAGE_ONLINE.getCode())
                && (curEntity.getManageStatus().getCode() >= ManageStatus.STATUS_MANAGE_ONLINE.getCode()))
                || ((newEntity.getManageStatus().getCode() > ManageStatus.STATUS_MANAGE_ONLINE.getCode())
                        && (curEntity.getManageStatus().getCode() < ManageStatus.STATUS_MANAGE_ONLINE.getCode()))) {
            result.setFailResult(DataOpErrCode.DERR_ILLEGAL_VALUE.getCode(),
                    strBuff.append("Illegal manage status, cannot reverse ")
                            .append(WebFieldDef.MANAGESTATUS.name).append(" from ")
                            .append(curEntity.getManageStatus().getDescription())
                            .append(" to ").append(newEntity.getManageStatus().getDescription())
                            .append(" for the broker(").append(WebFieldDef.BROKERID.name).append("=")
                            .append(curEntity.getBrokerId()).append(")!").toString());
            strBuff.delete(0, strBuff.length());
            return result.isSuccess();
        }
        return true;
    }
Check whether the management status change is legal

@param newEntity  the entity to be updated
@param curEntity  the current entity
@param strBuff    string buffer
@param result     check result of parameter value
@return  true for valid, false for invalid
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/metamanage/metastore/impl/AbsBrokerConfigMapperImpl.java