This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 9acf1e9ed73 Fix conflict config plan type (#17260)
9acf1e9ed73 is described below
commit 9acf1e9ed734ea8b575e275b0e20e37bb87f51a5
Author: Jiang Tian <[email protected]>
AuthorDate: Fri Mar 6 14:02:04 2026 +0800
Fix conflict config plan type (#17260)
* fix_conflict_plan_type
* remove unused enum
* remove unused enum
---
.../consensus/request/ConfigPhysicalPlanType.java | 1 -
.../persistence/auth/AuthorPlanExecutor.java | 2 -
.../persistence/executor/ConfigPlanExecutor.java | 1 -
.../request/ConfigPhysicalPlanTypeTest.java | 45 ++++++++++++++++++++++
4 files changed, 45 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanType.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanType.java
index c2a81b97b22..371435c9175 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanType.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanType.java
@@ -135,7 +135,6 @@ public enum ConfigPhysicalPlanType {
CreateUserWithRawPassword((short) 638),
UpdateUserMaxSession((short) 639),
UpdateUserMinSession((short) 640),
- AccountUnlock((short) 641),
/** Table Author */
RCreateUser((short) 641),
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
index 8f216df3250..c915630b4f5 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
@@ -147,8 +147,6 @@ public class AuthorPlanExecutor implements
IAuthorPlanExecutor {
case DropRole:
authorizer.deleteRole(roleName);
break;
- case AccountUnlock:
- break;
case GrantRole:
for (int permission : permissions) {
PrivilegeType priv = PrivilegeType.values()[permission];
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
index 12ba1d8840b..8016690d17c 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
@@ -459,7 +459,6 @@ public class ConfigPlanExecutor {
case DropUser:
case DropUserV2:
case DropRole:
- case AccountUnlock:
case GrantRole:
case GrantUser:
case GrantRoleToUser:
diff --git
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanTypeTest.java
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanTypeTest.java
new file mode 100644
index 00000000000..1a4028d9543
--- /dev/null
+++
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanTypeTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.consensus.request;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.fail;
+
+public class ConfigPhysicalPlanTypeTest {
+
+ @Test
+ public void checkUniqueness() {
+ Map<Short, ConfigPhysicalPlanType> map = new HashMap<>();
+ for (ConfigPhysicalPlanType value : ConfigPhysicalPlanType.values()) {
+ if (map.containsKey(value.getPlanType())) {
+ fail(
+ String.format(
+ "%s and %s have the same type number %s",
+ map.get(value.getPlanType()), value, value.getPlanType()));
+ } else {
+ map.put(value.getPlanType(), value);
+ }
+ }
+ }
+}