@Override
    @Transactional(rollbackFor = Throwable.class, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRES_NEW)
    public Boolean finishTagSwitch(String groupId) {
        LOGGER.info("start to finish switch cluster tag for group={}", groupId);

        InlongGroupInfo groupInfo = this.get(groupId);
        UserInfo userInfo = LoginUserUtils.getLoginUser();

        // check whether the current status supports modification
        GroupStatus curStatus = GroupStatus.forCode(groupInfo.getStatus());
        if (GroupStatus.notAllowedUpdate(curStatus)) {
            String errMsg = String.format("Current status=%s is not allowed to update", curStatus);
            LOGGER.error(errMsg);
            throw new BusinessException(ErrorCodeEnum.GROUP_UPDATE_NOT_ALLOWED, errMsg);
        }

        // check if the group is under switching
        List<InlongGroupExtInfo> groupExt = groupInfo.getExtList();
        Map<String, InlongGroupExtInfo> extInfoMap = groupExt.stream()
                .collect(Collectors.toMap(InlongGroupExtInfo::getKeyName, v -> v));

        if (!extInfoMap.containsKey(BACKUP_CLUSTER_TAG) || !extInfoMap.containsKey(BACKUP_MQ_RESOURCE)) {
            String errMsg = String.format("finish switch failed, current group is not under switching, group=[%s]",
                    groupId);
            LOGGER.error(errMsg);
            throw new BusinessException(errMsg);
        }

        InlongGroupExtInfo switchTime = extInfoMap.get(CLUSTER_SWITCH_TIME);
        LocalDateTime switchStartTime =
                switchTime == null ? LocalDateTime.MIN : LocalDateTime.parse(switchTime.getKeyValue());

        // check the switch time
        LocalDateTime allowSwitchTime = switchStartTime.plusMinutes(FINISH_SWITCH_INTERVAL_MIN);
        if (LocalDateTime.now().isBefore(allowSwitchTime)) {
            String errMsg = String.format("finish switch failed, please retry until={}", allowSwitchTime);
            LOGGER.error(errMsg);
            throw new BusinessException(errMsg);
        }

        // remove backup ext info
        removeExt(extInfoMap.get(BACKUP_CLUSTER_TAG));
        removeExt(extInfoMap.get(BACKUP_MQ_RESOURCE));
        removeExt(extInfoMap.get(CLUSTER_SWITCH_TIME));

        // trigger group workflow to rebuild configs
        this.triggerWorkFlow(groupInfo, userInfo);
        return true;
    }
Add constraints to the start and end time of the offline synchronization group.
1. startTime must >= current time
2. endTime must >= startTime
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java