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

rong pushed a commit to branch IOTDB-5787
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 4987a74800ef45d2a19451e7e235a90d87d2baed
Author: Steve Yurong Su <[email protected]>
AuthorDate: Mon May 8 02:02:45 2023 +0800

    state transition diagram of a pipe task
---
 .../apache/iotdb/db/pipe/agent/task/PipeTaskAgent.java    | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeTaskAgent.java 
b/server/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeTaskAgent.java
index e896cd765d7..c0df1e1761d 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeTaskAgent.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeTaskAgent.java
@@ -28,6 +28,19 @@ import org.apache.iotdb.commons.pipe.task.meta.PipeTaskMeta;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * State transition diagram of a pipe task:
+ *
+ * <p><code>
+ * |----------------|                     |---------| --> start pipe --> 
|---------|                   |---------|
+ * | initial status | --> create pipe --> | STOPPED |                    | 
RUNNING | --> drop pipe --> | DROPPED |
+ * |----------------|                     |---------| <-- stop  pipe <-- 
|---------|                   |---------|
+ *                                             |                               
                             |
+ *                                             | ----------------------> drop 
pipe -----------------------> |
+ * </code>
+ *
+ * <p>Other transitions are not allowed, will be ignored when received in the 
pipe task agent.
+ */
 public class PipeTaskAgent {
 
   private static final Logger LOGGER = 
LoggerFactory.getLogger(PipeTaskAgent.class);
@@ -90,7 +103,7 @@ public class PipeTaskAgent {
     // add pipe meta to pipe meta keeper
     // note that we do not need to set the status of pipe meta here, because 
the status of pipe meta
     // is already set to STOPPED when it is created
-    pipeMetaKeeper.addPipeMeta(pipeMeta.getStaticMeta().getPipeName(), 
pipeMeta);
+    pipeMetaKeeper.addPipeMeta(pipeName, pipeMeta);
   }
 
   public void createPipeTaskByConsensusGroup(

Reply via email to