umustafi commented on code in PR #3715:
URL: https://github.com/apache/gobblin/pull/3715#discussion_r1261830996
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/MysqlMultiActiveLeaseArbiter.java:
##########
@@ -384,8 +411,60 @@ protected <T> T withPreparedStatement(String sql,
CheckedFunction<PreparedStatem
}
return result;
} catch (SQLException e) {
- log.warn("Received SQL exception that can result from invalid
connection. Checking if validation query is set {} Exception is {}",
((HikariDataSource) this.dataSource).getConnectionTestQuery(), e);
+ log.warn("Received SQL exception that can result from invalid
connection. Checking if validation query is set {} "
+ + "Exception is {}", ((HikariDataSource)
this.dataSource).getConnectionTestQuery(), e);
throw new IOException(e);
}
}
+
+ @Data
+ /*
+ Class used to extract information from initial SELECT query resultSet to be
used for understanding the state of the
+ flow action event's lease in the arbiter store and act accordingly.
+ */
+ class GetEventInfoResult {
+ private Timestamp dbEventTimestamp;
+ private Timestamp dbLeaseAcquisitionTimestamp;
+ private boolean withinEpsilon;
+ private int leaseValidityStatus;
+ private int dbLinger;
+ private Timestamp dbCurrentTimestamp;
+
+ GetEventInfoResult(ResultSet resultSet) {
Review Comment:
good idea, I created two factory methods for `GetEventInfoResult` and
`SelectInfoResult` (naming perhaps isn't the best but can be addressed in later
PR)
--
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]