This is an automated email from the ASF dual-hosted git repository. jiangtian pushed a commit to branch fix_conflict_plan_type in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 60a4c77f60595fa275e5cb2cbaaabc08143a8e3a Author: Tian Jiang <[email protected]> AuthorDate: Thu Mar 5 10:47:25 2026 +0800 fix_conflict_plan_type --- .../consensus/request/ConfigPhysicalPlanType.java | 2 +- .../request/ConfigPhysicalPlanTypeTest.java | 45 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) 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..8b7060f616e 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 @@ -111,6 +111,7 @@ public enum ConfigPhysicalPlanType { ListRoleUsersDep((short) 617), // For version after and equal 1.2 + AccountUnlock((short) 620), CreateUser((short) 621), CreateRole((short) 622), @Deprecated @@ -135,7 +136,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/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); + } + } + } +}
