VYPR
Critical severityNVD Advisory· Published Sep 24, 2025· Updated Nov 4, 2025

Apache IoTDB: Deserialization of untrusted Data

CVE-2025-48459

Description

Deserialization of Untrusted Data vulnerability in Apache IoTDB.

This issue affects Apache IoTDB: from 1.0.0 before 2.0.5.

Users are recommended to upgrade to version 2.0.5, which fixes the issue.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Apache IoTDB 1.0.0 through 2.0.4 contains a deserialization vulnerability that can lead to remote code execution.

Vulnerability

Overview

CVE-2025-48459 is a deserialization of untrusted data vulnerability in Apache IoTDB, a time series database management system. The issue affects versions from 1.0.0 up to (but not including) 2.0.5. The root cause lies in the procedure execution framework, where certain exception subclasses and reflection-based operations were not properly sanitized, allowing untrusted data to be deserialized during procedure handling [1][3].

Exploitation

Prerequisites

An attacker would need network access to a vulnerable Apache IoTDB instance and the ability to send crafted serialized objects to the procedure executor. The vulnerability does not require authentication if the service is exposed without proper access controls, though the attack complexity is considered high due to the need for specific knowledge of the target environment's internal classes [2][4].

Impact

Successful exploitation could allow an attacker to execute arbitrary code on the server, leading to full compromise of the IoTDB node and potentially the larger time series data infrastructure. Given IoTDB's role in industrial IoT environments, this could result in data theft, service disruption, or lateral movement within the network [1][4].

Mitigation

Apache Software Foundation has released version 2.0.5 which removes vulnerable exception subclasses and fixes the deserialization issue by removing reflective invocation in the procedure execution path. Users are strongly advised to upgrade to this version immediately. No workarounds have been provided for earlier versions [1][3].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.iotdb:iotdb-confignodeMaven
>= 1.0.0, < 2.0.52.0.5

Affected products

2
  • Apache/IoTDBllm-fuzzy
    Range: >=1.0.0, <2.0.5
  • Apache Software Foundation/Apache IoTDBv5
    Range: 1.0.0

Patches

1
5ad4a940ed84

Remove all kinds of ProcedureException's subclass & Fix a security problem (#15563)

https://github.com/apache/iotdbLi Yu HengMay 22, 2025via ghsa
43 files changed · +51 304
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/exception/ProcedureAbortedException.java+0 30 removed
    @@ -1,30 +0,0 @@
    -/*
    - * 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.procedure.exception;
    -
    -public class ProcedureAbortedException extends ProcedureException {
    -  public ProcedureAbortedException() {
    -    super();
    -  }
    -
    -  public ProcedureAbortedException(String msg) {
    -    super(msg);
    -  }
    -}
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/exception/ProcedureSuspendedException.java+0 39 removed
    @@ -1,39 +0,0 @@
    -/*
    - * 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.procedure.exception;
    -
    -public class ProcedureSuspendedException extends ProcedureException {
    -
    -  private static final long serialVersionUID = -8328419627678496269L;
    -
    -  /** default constructor */
    -  public ProcedureSuspendedException() {
    -    super();
    -  }
    -
    -  /**
    -   * Constructor
    -   *
    -   * @param s message
    -   */
    -  public ProcedureSuspendedException(String s) {
    -    super(s);
    -  }
    -}
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/exception/ProcedureTimeoutException.java+0 26 removed
    @@ -1,26 +0,0 @@
    -/*
    - * 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.procedure.exception;
    -
    -public class ProcedureTimeoutException extends ProcedureException {
    -  public ProcedureTimeoutException(String s) {
    -    super(s);
    -  }
    -}
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/exception/ProcedureYieldException.java+0 36 removed
    @@ -1,36 +0,0 @@
    -/*
    - * 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.procedure.exception;
    -
    -public class ProcedureYieldException extends ProcedureException {
    -  /** Default constructor. */
    -  public ProcedureYieldException() {
    -    super();
    -  }
    -
    -  /**
    -   * Constructor.
    -   *
    -   * @param s message
    -   */
    -  public ProcedureYieldException(String s) {
    -    super(s);
    -  }
    -}
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/cq/CreateCQProcedure.java+1 3 modified
    @@ -28,8 +28,6 @@
     import org.apache.iotdb.confignode.manager.cq.CQScheduleTask;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
     import org.apache.iotdb.confignode.procedure.state.cq.CreateCQState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -84,7 +82,7 @@ public CreateCQProcedure(TCreateCQReq req, ScheduledExecutorService executor) {
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, CreateCQState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
     
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveAINodeProcedure.java+1 3 modified
    @@ -26,8 +26,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.model.DropModelInNodePlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.RemoveAINodeState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     import org.apache.iotdb.rpc.TSStatusCode;
    @@ -58,7 +56,7 @@ public RemoveAINodeProcedure() {
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveAINodeState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (removedAINode == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java+1 3 modified
    @@ -26,8 +26,6 @@
     import org.apache.iotdb.confignode.persistence.pipe.PipeTaskInfo;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.pipe.runtime.PipeMetaSyncProcedure;
     import org.apache.iotdb.confignode.procedure.state.ProcedureLockState;
    @@ -223,7 +221,7 @@ public abstract void executeFromOperateOnDataNodes(ConfigNodeProcedureEnv env)
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, OperatePipeTaskState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (pipeTaskInfo == null) {
           LOGGER.warn(
               "ProcedureId {}: Pipe lock is not acquired, executeFromState's execution will be skipped.",
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/plugin/CreatePipePluginProcedure.java+1 3 modified
    @@ -28,8 +28,6 @@
     import org.apache.iotdb.confignode.manager.pipe.coordinator.plugin.PipePluginCoordinator;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.node.AddConfigNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.node.RemoveConfigNodeProcedure;
    @@ -85,7 +83,7 @@ public CreatePipePluginProcedure(
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, CreatePipePluginState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (pipePluginMeta == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/plugin/DropPipePluginProcedure.java+1 3 modified
    @@ -27,8 +27,6 @@
     import org.apache.iotdb.confignode.persistence.subscription.SubscriptionInfo;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.node.AddConfigNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.node.RemoveConfigNodeProcedure;
    @@ -82,7 +80,7 @@ public DropPipePluginProcedure(String pluginName, boolean isSetIfExistsCondition
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, DropPipePluginState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (pluginName == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/AddRegionPeerProcedure.java+1 3 modified
    @@ -29,8 +29,6 @@
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.env.RegionMaintainHandler;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.AddRegionPeerState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     import org.apache.iotdb.db.utils.DateTimeUtils;
    @@ -75,7 +73,7 @@ public AddRegionPeerProcedure(
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, AddRegionPeerState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (regionId == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/NotifyRegionMigrationProcedure.java+1 3 modified
    @@ -24,8 +24,6 @@
     import org.apache.iotdb.commons.utils.ThriftCommonsSerDeUtils;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.NotifyRegionMigrationState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     
    @@ -56,7 +54,7 @@ public NotifyRegionMigrationProcedure(TConsensusGroupId consensusGroupId, boolea
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, NotifyRegionMigrationState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (regionId == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/ReconstructRegionProcedure.java+1 3 modified
    @@ -26,8 +26,6 @@
     import org.apache.iotdb.commons.utils.ThriftCommonsSerDeUtils;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.ReconstructRegionState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     import org.apache.iotdb.db.utils.DateTimeUtils;
    @@ -57,7 +55,7 @@ public ReconstructRegionProcedure(
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, ReconstructRegionState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         try {
           switch (state) {
             case RECONSTRUCT_REGION_PREPARE:
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/RemoveRegionPeerProcedure.java+1 3 modified
    @@ -30,8 +30,6 @@
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.env.RegionMaintainHandler;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.RemoveRegionPeerState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     import org.apache.iotdb.db.utils.DateTimeUtils;
    @@ -82,7 +80,7 @@ private void handleTransferLeader(RegionMaintainHandler handler)
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveRegionPeerState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (regionId == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/AlterLogicalViewProcedure.java+1 3 modified
    @@ -35,8 +35,6 @@
     import org.apache.iotdb.confignode.client.async.handlers.DataNodeAsyncRequestContext;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.AlterLogicalViewState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -91,7 +89,7 @@ public AlterLogicalViewProcedure(
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final AlterLogicalViewState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeactivateTemplateProcedure.java+1 3 modified
    @@ -35,8 +35,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.pipe.payload.PipeEnrichedPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DeactivateTemplateState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -97,7 +95,7 @@ public DeactivateTemplateProcedure(
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, DeactivateTemplateState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteDatabaseProcedure.java+1 3 modified
    @@ -36,8 +36,6 @@
     import org.apache.iotdb.confignode.persistence.partition.maintainer.RegionDeleteTask;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DeleteStorageGroupState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -86,7 +84,7 @@ public void setDeleteDatabaseSchema(final TDatabaseSchema deleteDatabaseSchema)
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final DeleteStorageGroupState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (deleteDatabaseSchema == null) {
           return Flow.NO_MORE_STATE;
         }
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteLogicalViewProcedure.java+1 3 modified
    @@ -33,8 +33,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.pipe.payload.PipeEnrichedPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DeleteLogicalViewState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -92,7 +90,7 @@ public DeleteLogicalViewProcedure(
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final DeleteLogicalViewState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteTimeSeriesProcedure.java+1 3 modified
    @@ -33,8 +33,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.pipe.payload.PipeEnrichedPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DeleteTimeSeriesState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -97,7 +95,7 @@ public DeleteTimeSeriesProcedure(
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final DeleteTimeSeriesState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTemplateProcedure.java+1 3 modified
    @@ -39,8 +39,6 @@
     import org.apache.iotdb.confignode.consensus.response.template.TemplateInfoResp;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.SetTemplateState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -100,7 +98,7 @@ public SetTemplateProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final SetTemplateState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTTLProcedure.java+1 3 modified
    @@ -32,8 +32,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.pipe.payload.PipeEnrichedPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.SetTTLState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -67,7 +65,7 @@ public SetTTLProcedure(SetTTLPlan plan, final boolean isGeneratedByPipe) {
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, SetTTLState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AddTableColumnProcedure.java+1 3 modified
    @@ -29,8 +29,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.AddTableViewColumnPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.AddViewColumnProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.AddTableColumnState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -68,7 +66,7 @@ public AddTableColumnProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final AddTableColumnState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/CreateTableProcedure.java+1 3 modified
    @@ -30,8 +30,6 @@
     import org.apache.iotdb.confignode.exception.DatabaseNotExistsException;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.impl.schema.SchemaUtils;
     import org.apache.iotdb.confignode.procedure.state.schema.CreateTableState;
    @@ -73,7 +71,7 @@ public CreateTableProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final CreateTableState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/DeleteDevicesProcedure.java+1 3 modified
    @@ -33,8 +33,6 @@
     import org.apache.iotdb.confignode.manager.ClusterManager;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.DataNodeRegionTaskExecutor;
     import org.apache.iotdb.confignode.procedure.state.schema.DeleteDevicesState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -97,7 +95,7 @@ public DeleteDevicesProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDevicesState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/DropTableColumnProcedure.java+1 3 modified
    @@ -34,8 +34,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.PreDeleteViewColumnPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.SchemaUtils;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.DropViewColumnProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DropTableColumnState;
    @@ -85,7 +83,7 @@ protected String getActionMessage() {
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final DropTableColumnState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/DropTableProcedure.java+1 3 modified
    @@ -34,8 +34,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.PreDeleteViewPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.SchemaUtils;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.DropViewProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.DropTableState;
    @@ -76,7 +74,7 @@ protected String getActionMessage() {
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DropTableState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/RenameTableColumnProcedure.java+1 3 modified
    @@ -27,8 +27,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.RenameViewColumnPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.RenameViewColumnProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.RenameTableColumnState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -70,7 +68,7 @@ public RenameTableColumnProcedure(
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final RenameTableColumnState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/RenameTableProcedure.java+1 3 modified
    @@ -27,8 +27,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.RenameViewPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.RenameViewProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.RenameTableState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -63,7 +61,7 @@ public RenameTableProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final RenameTableState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/SetTablePropertiesProcedure.java+1 3 modified
    @@ -27,8 +27,6 @@
     import org.apache.iotdb.confignode.consensus.request.write.table.view.SetViewPropertiesPlan;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.schema.table.view.SetViewPropertiesProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.SetTablePropertiesState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -76,7 +74,7 @@ public SetTablePropertiesProcedure(
       @Override
       protected Flow executeFromState(
           final ConfigNodeProcedureEnv env, final SetTablePropertiesState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/UnsetTemplateProcedure.java+1 3 modified
    @@ -31,8 +31,6 @@
     import org.apache.iotdb.confignode.client.async.handlers.DataNodeAsyncRequestContext;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.state.schema.UnsetTemplateState;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
    @@ -86,7 +84,7 @@ public UnsetTemplateProcedure(
     
       @Override
       protected Flow executeFromState(final ConfigNodeProcedureEnv env, final UnsetTemplateState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         final long startTime = System.currentTimeMillis();
         try {
           switch (state) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java+2 6 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.Procedure;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     
     import org.apache.thrift.annotation.Nullable;
     import org.slf4j.Logger;
    @@ -90,8 +88,7 @@ protected final int getCycles() {
        * @return Flow.NO_MORE_STATE if the procedure is completed, Flow.HAS_MORE_STATE if there is
        *     another step.
        */
    -  protected abstract Flow executeFromState(Env env, TState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException;
    +  protected abstract Flow executeFromState(Env env, TState state) throws InterruptedException;
     
       /**
        * Called to perform the rollback of the specified state.
    @@ -144,8 +141,7 @@ protected void addChildProcedure(Procedure<Env> childProcedure) {
       }
     
       @Override
    -  protected Procedure<Env>[] execute(final Env env)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +  protected Procedure<Env>[] execute(final Env env) throws InterruptedException {
         updateTimestamp();
         try {
           if (noMoreState() || isFailed()) {
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/AbstractOperateSubscriptionProcedure.java+1 3 modified
    @@ -24,8 +24,6 @@
     import org.apache.iotdb.confignode.persistence.subscription.SubscriptionInfo;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
     import org.apache.iotdb.confignode.procedure.impl.subscription.consumer.runtime.ConsumerGroupMetaSyncProcedure;
     import org.apache.iotdb.confignode.procedure.impl.subscription.topic.runtime.TopicMetaSyncProcedure;
    @@ -181,7 +179,7 @@ protected abstract void executeFromOperateOnDataNodes(ConfigNodeProcedureEnv env
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, OperateSubscriptionState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (subscriptionInfo == null) {
           LOGGER.warn(
               "ProcedureId {}: Subscription lock is not acquired, executeFromState({})'s execution will be skipped.",
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/sync/AbstractOperatePipeProcedure.java+1 3 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.impl.pipe.AbstractOperatePipeProcedureV2;
     import org.apache.iotdb.confignode.procedure.state.sync.OperatePipeState;
    @@ -40,7 +38,7 @@ abstract class AbstractOperatePipeProcedure
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, OperatePipeState state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         return Flow.NO_MORE_STATE;
       }
     
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/testonly/AddNeverFinishSubProcedureProcedure.java+1 3 modified
    @@ -22,8 +22,6 @@
     import org.apache.iotdb.commons.utils.TestOnly;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     
    @@ -42,7 +40,7 @@ public class AddNeverFinishSubProcedureProcedure
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, Integer state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         if (state == 0) {
           // the sub procedure will never finish, so the father procedure should never be called again
           addChildProcedure(new NeverFinishProcedure());
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/testonly/NeverFinishProcedure.java+1 3 modified
    @@ -22,8 +22,6 @@
     import org.apache.iotdb.commons.utils.TestOnly;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     import org.apache.iotdb.confignode.procedure.store.ProcedureType;
     
    @@ -42,7 +40,7 @@ public NeverFinishProcedure(long procId) {
     
       @Override
       protected Flow executeFromState(ConfigNodeProcedureEnv env, Integer state)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         setNextState(state + 1);
         Thread.sleep(1000);
         return Flow.HAS_MORE_STATE;
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/InternalProcedure.java+1 5 modified
    @@ -19,9 +19,6 @@
     
     package org.apache.iotdb.confignode.procedure;
     
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
    -
     import java.io.IOException;
     import java.nio.ByteBuffer;
     
    @@ -38,8 +35,7 @@ protected InternalProcedure(long toMillis) {
       protected abstract void periodicExecute(final Env env);
     
       @Override
    -  protected Procedure<Env>[] execute(Env env)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<Env>[] execute(Env env) throws InterruptedException {
         throw new UnsupportedOperationException();
       }
     
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java+0 4 modified
    @@ -23,7 +23,6 @@
     import org.apache.iotdb.commons.utils.TestOnly;
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.scheduler.ProcedureScheduler;
     import org.apache.iotdb.confignode.procedure.scheduler.SimpleProcedureScheduler;
     import org.apache.iotdb.confignode.procedure.state.ProcedureLockState;
    @@ -417,9 +416,6 @@ private void executeProcedure(RootProcedureStack rootProcStack, Procedure<Env> p
             if (subprocs != null && subprocs.length == 0) {
               subprocs = null;
             }
    -      } catch (ProcedureYieldException e) {
    -        LOG.debug("Yield {}", proc);
    -        yieldProcedure(proc);
           } catch (InterruptedException e) {
             LOG.warn("Interrupt during execution, suspend or retry it later.", e);
             yieldProcedure(proc);
    
  • iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java+13 49 modified
    @@ -20,11 +20,7 @@
     package org.apache.iotdb.confignode.procedure;
     
     import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureAbortedException;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureTimeoutException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.state.ProcedureLockState;
     import org.apache.iotdb.confignode.procedure.state.ProcedureState;
     import org.apache.iotdb.confignode.procedure.store.IProcedureStore;
    @@ -34,7 +30,6 @@
     
     import java.io.DataOutputStream;
     import java.io.IOException;
    -import java.lang.reflect.InvocationTargetException;
     import java.nio.ByteBuffer;
     import java.nio.charset.StandardCharsets;
     import java.util.ArrayList;
    @@ -83,14 +78,9 @@ public final boolean hasLock() {
        * @param env the environment passed to the ProcedureExecutor
        * @return a set of sub-procedures to run or ourselves if there is more work to do or null if the
        *     procedure is done.
    -   * @throws ProcedureYieldException the procedure will be added back to the queue and retried
    -   *     later.
        * @throws InterruptedException the procedure will be added back to the queue and retried later.
    -   * @throws ProcedureSuspendedException Signal to the executor that Procedure has suspended itself
    -   *     and has set itself up waiting for an external event to wake it back up again.
        */
    -  protected abstract Procedure<Env>[] execute(Env env)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException;
    +  protected abstract Procedure<Env>[] execute(Env env) throws InterruptedException;
     
       /**
        * The code to undo what was done by the execute() code. It is called when the procedure or one of
    @@ -130,11 +120,14 @@ public void serialize(DataOutputStream stream) throws IOException {
     
         // exceptions
         if (hasException()) {
    +      // symbol of exception
           stream.write((byte) 1);
    +      // exception's name
           String exceptionClassName = exception.getClass().getName();
           byte[] exceptionClassNameBytes = exceptionClassName.getBytes(StandardCharsets.UTF_8);
           stream.writeInt(exceptionClassNameBytes.length);
           stream.write(exceptionClassNameBytes);
    +      // exception's message
           String message = this.exception.getMessage();
           if (message != null) {
             byte[] messageBytes = message.getBytes(StandardCharsets.UTF_8);
    @@ -144,6 +137,7 @@ public void serialize(DataOutputStream stream) throws IOException {
             stream.writeInt(-1);
           }
         } else {
    +      // symbol of no exception
           stream.write((byte) 0);
         }
     
    @@ -181,29 +175,18 @@ public void deserialize(ByteBuffer byteBuffer) {
           }
           this.setStackIndexes(indexList);
         }
    -    // exceptions
    +
    +    // exception
         if (byteBuffer.get() == 1) {
    -      Class<?> exceptionClass = deserializeTypeInfo(byteBuffer);
    +      deserializeTypeInfoForCompatibility(byteBuffer);
           int messageBytesLength = byteBuffer.getInt();
           String errMsg = null;
           if (messageBytesLength > 0) {
             byte[] messageBytes = new byte[messageBytesLength];
             byteBuffer.get(messageBytes);
             errMsg = new String(messageBytes, StandardCharsets.UTF_8);
           }
    -      ProcedureException exception;
    -      try {
    -        exception =
    -            (ProcedureException) exceptionClass.getConstructor(String.class).newInstance(errMsg);
    -      } catch (InstantiationException
    -          | IllegalAccessException
    -          | InvocationTargetException
    -          | NoSuchMethodException e) {
    -        LOG.warn("Instantiation exception class failed", e);
    -        exception = new ProcedureException(errMsg);
    -      }
    -
    -      setFailure(exception);
    +      setFailure(new ProcedureException(errMsg));
         }
     
         // result
    @@ -224,18 +207,11 @@ public void deserialize(ByteBuffer byteBuffer) {
        * @param byteBuffer bytebuffer
        * @return Procedure
        */
    -  public static Class<?> deserializeTypeInfo(ByteBuffer byteBuffer) {
    +  @Deprecated
    +  public static void deserializeTypeInfoForCompatibility(ByteBuffer byteBuffer) {
         int classNameBytesLen = byteBuffer.getInt();
         byte[] classNameBytes = new byte[classNameBytesLen];
         byteBuffer.get(classNameBytes);
    -    String className = new String(classNameBytes, StandardCharsets.UTF_8);
    -    Class<?> clazz;
    -    try {
    -      clazz = Class.forName(className);
    -    } catch (ClassNotFoundException e) {
    -      throw new RuntimeException("Invalid procedure class", e);
    -    }
    -    return clazz;
       }
     
       /**
    @@ -284,8 +260,7 @@ protected boolean isYieldAfterExecution(Env env) {
        * @param env execute environment
        * @return sub procedures
        */
    -  protected Procedure<Env>[] doExecute(Env env)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<Env>[] doExecute(Env env) throws InterruptedException {
         try {
           updateTimestamp();
           return execute(env);
    @@ -676,20 +651,9 @@ protected synchronized void setFailure(final ProcedureException exception) {
         }
       }
     
    -  protected void setAbortFailure(final String source, final String msg) {
    -    setFailure(source, new ProcedureAbortedException(msg));
    -  }
    -
       /**
        * Called by the ProcedureExecutor when the timeout set by setTimeout() is expired.
        *
    -   * <p>Another usage for this method is to implement retrying. A procedure can set the state to
    -   * {@code WAITING_TIMEOUT} by calling {@code setState} method, and throw a {@link
    -   * ProcedureSuspendedException} to halt the execution of the procedure, and do not forget a call
    -   * {@link #setTimeout(long)} method to set the timeout. And you should also override this method
    -   * to wake up the procedure, and also return false to tell the ProcedureExecutor that the timeout
    -   * event has been handled.
    -   *
        * @return true to let the framework handle the timeout as abort, false in case the procedure
        *     handled the timeout itself.
        */
    @@ -698,7 +662,7 @@ protected synchronized boolean setTimeoutFailure(Env env) {
           long timeDiff = System.currentTimeMillis() - lastUpdate;
           setFailure(
               "ProcedureExecutor",
    -          new ProcedureTimeoutException("Operation timed out after " + timeDiff + " ms."));
    +          new ProcedureException("Operation timed out after " + timeDiff + " ms."));
           return true;
         }
         return false;
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/IncProcedure.java+1 4 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.Procedure;
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     
     import java.io.DataOutputStream;
     import java.io.IOException;
    @@ -33,8 +31,7 @@ public class IncProcedure extends Procedure<TestProcEnv> {
       public boolean throwEx = false;
     
       @Override
    -  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv) throws InterruptedException {
         AtomicInteger acc = testProcEnv.getAcc();
         if (throwEx) {
           throw new RuntimeException("throw a EXCEPTION");
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/NoopProcedure.java+1 4 modified
    @@ -21,16 +21,13 @@
     
     import org.apache.iotdb.confignode.procedure.Procedure;
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     
     import java.io.IOException;
     
     public class NoopProcedure extends Procedure<TestProcEnv> {
     
       @Override
    -  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv) throws InterruptedException {
         return new Procedure[0];
       }
     
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/SimpleLockProcedure.java+1 4 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.Procedure;
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.scheduler.SimpleProcedureScheduler;
     import org.apache.iotdb.confignode.procedure.state.ProcedureLockState;
     
    @@ -39,8 +37,7 @@ public SimpleLockProcedure(String procName) {
       }
     
       @Override
    -  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv) throws InterruptedException {
         testProcEnv.executeSeq.append(procName);
         return null;
       }
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/SimpleSTMProcedure.java+1 3 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     
     import java.io.IOException;
    @@ -41,7 +39,7 @@ public enum TestState {
     
       @Override
       protected Flow executeFromState(TestProcEnv testProcEnv, TestState testState)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         AtomicInteger acc = testProcEnv.getAcc();
         try {
           switch (testState) {
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/SleepProcedure.java+1 4 modified
    @@ -21,17 +21,14 @@
     
     import org.apache.iotdb.confignode.procedure.Procedure;
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.util.ProcedureTestUtil;
     
     import java.io.DataOutputStream;
     import java.io.IOException;
     
     public class SleepProcedure extends Procedure<TestProcEnv> {
       @Override
    -  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv)
    -      throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException {
    +  protected Procedure<TestProcEnv>[] execute(TestProcEnv testProcEnv) throws InterruptedException {
         System.out.println("Procedure is sleeping.");
         ProcedureTestUtil.sleepWithoutInterrupt(2000);
         return null;
    
  • iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/procedure/entity/StuckSTMProcedure.java+1 3 modified
    @@ -21,8 +21,6 @@
     
     import org.apache.iotdb.confignode.procedure.env.TestProcEnv;
     import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureSuspendedException;
    -import org.apache.iotdb.confignode.procedure.exception.ProcedureYieldException;
     import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure;
     
     import java.io.DataOutputStream;
    @@ -48,7 +46,7 @@ public enum TestState {
     
       @Override
       protected Flow executeFromState(TestProcEnv testProcEnv, TestState testState)
    -      throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    +      throws InterruptedException {
         AtomicInteger acc = testProcEnv.getAcc();
         try {
           switch (testState) {
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.