private boolean isValidValuesChange(TopicDeployEntity newEntity,
            TopicDeployEntity curEntity,
            StringBuilder strBuff,
            ProcessResult result) {
        // check if shrink data store block
        if (newEntity.getNumPartitions() != TBaseConstants.META_VALUE_UNDEFINED
                && newEntity.getNumPartitions() < curEntity.getNumPartitions()) {
            result.setFailResult(DataOpErrCode.DERR_ILLEGAL_VALUE.getCode(),
                    strBuff.append("Partition number less than before,")
                            .append(" new value is ").append(newEntity.getNumPartitions())
                            .append(", current value is ").append(curEntity.getNumPartitions())
                            .append("in brokerId-topicName(").append(curEntity.getRecordKey())
                            .append(") record!").toString());
            strBuff.delete(0, strBuff.length());
            return result.isSuccess();
        }
        if (newEntity.getNumTopicStores() != TBaseConstants.META_VALUE_UNDEFINED
                && newEntity.getNumTopicStores() < curEntity.getNumTopicStores()) {
            result.setFailResult(DataOpErrCode.DERR_ILLEGAL_VALUE.getCode(),
                    strBuff.append("TopicStores number less than before,")
                            .append(" new value is ").append(newEntity.getNumTopicStores())
                            .append(", current value is ").append(curEntity.getNumTopicStores())
                            .append("in brokerId-topicName(").append(curEntity.getRecordKey())
                            .append(") record!").toString());
            strBuff.delete(0, strBuff.length());
            return result.isSuccess();
        }
        // check whether the deploy status is equal
        if (newEntity.getTopicStatus() == curEntity.getTopicStatus()) {
            if (!newEntity.isValidTopicStatus()) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("Softly deleted record cannot be changed,")
                                .append(" please resume or hard remove for brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return result.isSuccess();
            }
            return true;
        }
        // check deploy status case from valid to invalid
        if (curEntity.isValidTopicStatus() && !newEntity.isValidTopicStatus()) {
            if (curEntity.isAcceptPublish()
                    || curEntity.isAcceptSubscribe()) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("The values of acceptPublish and acceptSubscribe must be false")
                                .append(" before change status of brokerId-topicName(")
                                .append(curEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return result.isSuccess();
            }
            if (newEntity.getTopicStatus().getCode() > TopicStatus.STATUS_TOPIC_SOFT_DELETE.getCode()) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("Please softly deleted the brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record first!").toString());
                strBuff.delete(0, strBuff.length());
                return result.isSuccess();
            }
            return true;
        }
        // check deploy status case from invalid to invalid
        if (!curEntity.isValidTopicStatus() && !newEntity.isValidTopicStatus()) {
            if (!((curEntity.getTopicStatus() == TopicStatus.STATUS_TOPIC_SOFT_DELETE
                    && newEntity.getTopicStatus() == TopicStatus.STATUS_TOPIC_SOFT_REMOVE)
                    || (curEntity.getTopicStatus() == TopicStatus.STATUS_TOPIC_SOFT_REMOVE
                            && newEntity.getTopicStatus() == TopicStatus.STATUS_TOPIC_HARD_REMOVE))) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("Illegal transfer status from ")
                                .append(curEntity.getTopicStatus().getDescription())
                                .append(" to ").append(newEntity.getTopicStatus().getDescription())
                                .append(" for the brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return result.isSuccess();
            }
            if (newEntity.isAcceptPublish()
                    || newEntity.isAcceptSubscribe()) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("The values of acceptPublish and acceptSubscribe must be false")
                                .append(" before change status of brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return result.isSuccess();
            }
            return true;
        }
        // check deploy status case from invalid to valid
        if (!curEntity.isValidTopicStatus() && newEntity.isValidTopicStatus()) {
            if (curEntity.getTopicStatus() != TopicStatus.STATUS_TOPIC_SOFT_DELETE) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("Illegal transfer status from ")
                                .append(curEntity.getTopicStatus().getDescription())
                                .append(" to ").append(newEntity.getTopicStatus().getDescription())
                                .append(" for the brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return !result.isSuccess();
            }
            if (newEntity.isAcceptPublish()
                    || newEntity.isAcceptSubscribe()) {
                result.setFailResult(DataOpErrCode.DERR_ILLEGAL_STATUS.getCode(),
                        strBuff.append("The values of acceptPublish and acceptSubscribe must be false")
                                .append(" before change status of brokerId-topicName(")
                                .append(newEntity.getRecordKey()).append(") record!").toString());
                strBuff.delete(0, strBuff.length());
                return !result.isSuccess();
            }
            return false;
        }
        return false;
    }
Check whether the change of deploy values is valid
Attention, the newEntity and newEntity must not equal

@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/AbsTopicDeployMapperImpl.java