umustafi commented on code in PR #3715:
URL: https://github.com/apache/gobblin/pull/3715#discussion_r1267123187


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/MysqlMultiActiveLeaseArbiter.java:
##########
@@ -99,10 +99,10 @@ protected interface CheckedFunction<T, R> {
       + "lease_acquisition_timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, 
"
       + "PRIMARY KEY (flow_group,flow_name,flow_execution_id,flow_action))";
   private static final String CREATE_CONSTANTS_TABLE_STATEMENT = "CREATE TABLE 
IF NOT EXISTS %s "
-      + "(epsilon INT, linger INT, PRIMARY KEY (epsilon, linger))";
+      + "(primary_key INT, epsilon INT, linger INT, PRIMARY KEY 
(primary_key))";
   // Only insert epsilon and linger values from config if this table does not 
contain a pre-existing values already.
-  private static final String INSERT_IN_CONSTANTS_TABLE_STATEMENT = "INSERT 
INTO %s (epsilon, linger) SELECT ?, ? "
-    + "WHERE NOT EXISTS (SELECT 1 FROM %s)";
+  private static final String INSERT_IN_CONSTANTS_TABLE_STATEMENT = "INSERT 
INTO %s (primary_key, epsilon, linger) "

Review Comment:
   good idea



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to