abhishekmjain commented on code in PR #4032:
URL: https://github.com/apache/gobblin/pull/4032#discussion_r1726411207


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagStateStoreWithDagNodes.java:
##########
@@ -77,19 +77,19 @@ public class MysqlDagStateStoreWithDagNodes implements 
DagStateStoreWithDagNodes
   protected final GsonSerDe<List<JobExecutionPlan>> serDe;
   private final JobExecutionPlanDagFactory jobExecPlanDagFactory;
 
-  // todo add a column that tells if it is a running dag or a failed dag
-  protected static final String CREATE_TABLE_STATEMENT = "CREATE TABLE IF NOT 
EXISTS %s ("
-      + "dag_node_id VARCHAR(" + ServiceConfigKeys.MAX_DAG_NODE_ID_LENGTH + ") 
CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, "
-      + "parent_dag_id VARCHAR(" + ServiceConfigKeys.MAX_DAG_ID_LENGTH + ") 
NOT NULL, "
-      + "dag_node JSON NOT NULL, "
-      + "modified_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP, "
-      + "PRIMARY KEY (dag_node_id), "
-      + "UNIQUE INDEX dag_node_index (dag_node_id), "
-      + "INDEX dag_index (parent_dag_id))";
-
-  protected static final String INSERT_STATEMENT = "INSERT INTO %s 
(dag_node_id, parent_dag_id, dag_node) "
-      + "VALUES (?, ?, ?) AS new ON DUPLICATE KEY UPDATE dag_node = 
new.dag_node";
-  protected static final String GET_DAG_NODES_STATEMENT = "SELECT dag_node 
FROM %s WHERE parent_dag_id = ?";
+  protected static final String CREATE_TABLE_STATEMENT =
+      "CREATE TABLE IF NOT EXISTS %s (" + "dag_node_id VARCHAR(" + 
ServiceConfigKeys.MAX_DAG_NODE_ID_LENGTH
+          + ") CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, " + 
"parent_dag_id VARCHAR("
+          + ServiceConfigKeys.MAX_DAG_ID_LENGTH + ") NOT NULL, " + "dag_node 
JSON NOT NULL, "
+          + "modified_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON 
UPDATE CURRENT_TIMESTAMP, "
+          + "is_failed_dag TINYINT(1) DEFAULT 0, " + "PRIMARY KEY 
(dag_node_id), "

Review Comment:
   nit: shall we rename to is_failed? Since it is implied that it's a dag.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to