Skip to content

Commit

Permalink
DSCON-117, DBConnector exception while incremental loading - revert
Browse files Browse the repository at this point in the history
This reverts commit c3a6023.
  • Loading branch information
AndreyIg committed Feb 4, 2020
1 parent c3a6023 commit 86f3f65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,10 @@ public void commitOffset(Map<String, ?> offset) {
}

private boolean connectionProblem (Throwable e){
if (e.getMessage() == null || e.getCause() == null) {
return false;
}
return e.getMessage().startsWith("ORA-03135") ||
e.getMessage().startsWith("ORA-12543") ||
e.getCause() instanceof IOException ||
e.getCause().getCause() instanceof NetException;
(e.getCause() != null && e.getCause().getCause() instanceof NetException);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private BigDecimal calculateSmallestScn() {
.map(transaction -> transaction.firstScn)
.min(BigDecimal::compareTo)
.orElseThrow(() -> new DataException("Cannot calculate smallest SCN"));
metrics.ifPresent(m -> m.setOldestScn(scn == null ? -1 : scn.longValue()));
metrics.ifPresent(m -> m.setOldestScn(scn == null ? null : scn.longValue()));
return scn;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public long getMinLagFromSource() {

@Override
public long getAverageLagFromSource() {
return totalLagsFromTheSource.get().toMillis()/(capturedDmlCounter.get() == 0 ? 1 : capturedDmlCounter.get());
return totalLagsFromTheSource.get().toMillis()/capturedDmlCounter.get() == 0 ? 1 : capturedDmlCounter.get();
}

@Override
Expand Down

0 comments on commit 86f3f65

Please sign in to comment.