DBZ-2994 Use null default rather than Scn.ZERO

This commit is contained in:
Chris Cranford 2021-03-17 05:26:39 -04:00 committed by Gunnar Morling
parent da02ca2a23
commit f91a01fb86

View File

@ -10,6 +10,7 @@
import java.sql.Timestamp;
import java.time.Duration;
import java.time.Instant;
import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -54,8 +55,8 @@ class LogMinerQueryResultProcessor {
private final OracleConnectorConfig connectorConfig;
private final Clock clock;
private final Logger LOGGER = LoggerFactory.getLogger(LogMinerQueryResultProcessor.class);
private Scn currentOffsetScn = Scn.ZERO;
private Scn currentOffsetCommitScn = Scn.ZERO;
private Scn currentOffsetScn;
private Scn currentOffsetCommitScn;
private long stuckScnCounter = 0;
private HistoryRecorder historyRecorder;
@ -263,7 +264,7 @@ private void warnStuckScn() {
if (offsetContext != null && offsetContext.getCommitScn() != null) {
final Scn scn = offsetContext.getScn();
final Scn commitScn = offsetContext.getCommitScn();
if (currentOffsetScn.equals(scn) && !currentOffsetCommitScn.equals(commitScn)) {
if (Objects.equals(currentOffsetScn, scn) && !Objects.equals(currentOffsetCommitScn, commitScn)) {
stuckScnCounter++;
// logWarn only once
if (stuckScnCounter == 25) {