This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new b0a70bda57 [INLONG-10300][Manager] Allow unsubmitted groups to modify 
mq type (#10304)
b0a70bda57 is described below

commit b0a70bda57b7525a30664325500fc2aa56e902ad
Author: fuweng11 <76141879+fuwen...@users.noreply.github.com>
AuthorDate: Wed May 29 20:06:38 2024 +0800

    [INLONG-10300][Manager] Allow unsubmitted groups to modify mq type (#10304)
---
 .../apache/inlong/manager/service/group/InlongGroupServiceImpl.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
index 49e55cfbd0..6bdda6fd45 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
@@ -714,8 +714,10 @@ public class InlongGroupServiceImpl implements 
InlongGroupService {
 
     private void chkUnmodifiableParams(InlongGroupEntity entity, 
InlongGroupRequest request) {
         // check mqType
-        Preconditions.expectEquals(entity.getMqType(), request.getMqType(),
-                ErrorCodeEnum.INVALID_PARAMETER, "mqType not allowed modify");
+        Preconditions.expectTrue(
+                Objects.equals(entity.getMqType(), request.getMqType())
+                        || Objects.equals(entity.getStatus(), 
GroupStatus.TO_BE_SUBMIT.getCode()),
+                "mqType not allowed modify");
         // check record version
         Preconditions.expectEquals(entity.getVersion(), request.getVersion(),
                 ErrorCodeEnum.CONFIG_EXPIRED,

Reply via email to