[
https://issues.apache.org/jira/browse/GOBBLIN-1851?focusedWorklogId=871410&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-871410
]
ASF GitHub Bot logged work on GOBBLIN-1851:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/23 23:59
Start Date: 17/Jul/23 23:59
Worklog Time Spent: 10m
Work Description: umustafi commented on code in PR #3715:
URL: https://github.com/apache/gobblin/pull/3715#discussion_r1266023739
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/MysqlMultiActiveLeaseArbiter.java:
##########
@@ -287,32 +304,43 @@ else if (leaseValidityStatus == 2) {
}
}
- protected Optional<GetEventInfoResult> createGetInfoResult(ResultSet
resultSet) {
+ protected GetEventInfoResult createGetInfoResult(ResultSet resultSet) throws
SQLException {
try {
// Extract values from result set
Timestamp dbEventTimestamp = resultSet.getTimestamp("event_timestamp");
Timestamp dbLeaseAcquisitionTimestamp =
resultSet.getTimestamp("lease_acquisition_timestamp");
- boolean withinEpsilon = resultSet.getBoolean("isWithinEpsilon");
- int leaseValidityStatus = resultSet.getInt("leaseValidityStatus");
+ boolean withinEpsilon = resultSet.getBoolean("is_within_epsilon");
+ int leaseValidityStatus = resultSet.getInt("lease_validity_status");
int dbLinger = resultSet.getInt("linger");
Timestamp dbCurrentTimestamp =
resultSet.getTimestamp("CURRENT_TIMESTAMP");
- return Optional.of(new GetEventInfoResult(dbEventTimestamp,
dbLeaseAcquisitionTimestamp, withinEpsilon, leaseValidityStatus,
- dbLinger, dbCurrentTimestamp));
- } catch (SQLException exception) {
- log.warn("Failed to retrieve values from GET event info query resultSet.
Exception: ", exception);
- // Note: this will proceed to CASE 1 of acquiring a lease above
- return Optional.absent();
+ return new GetEventInfoResult(dbEventTimestamp,
dbLeaseAcquisitionTimestamp, withinEpsilon, leaseValidityStatus,
+ dbLinger, dbCurrentTimestamp);
+ } catch (SQLException e) {
+ throw e;
Review Comment:
I meant to wrap in `IOException` as we do that in other places, updating to
wrap it.
Issue Time Tracking
-------------------
Worklog Id: (was: 871410)
Time Spent: 40m (was: 0.5h)
> Unit Testing of Multi-active Algorithm
> --------------------------------------
>
> Key: GOBBLIN-1851
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1851
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Tests all cases of trying to acquire a lease for a flow action event with one
> participant involved and makes corresponding fixes in the
> `MultiActiveLeaseArbiter`.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)