DBZ-7619 Metric ScnFreezeCount never increases

This commit is contained in:
jchipmunk 2024-03-09 13:32:07 +03:00 committed by Chris Cranford
parent 05df682624
commit 43ed0241ed
2 changed files with 14 additions and 3 deletions

View File

@ -541,6 +541,16 @@ public void incrementScnFreezeCount() {
scnFreezeCount.incrementAndGet();
}
/**
* Sets the number of times the system change number is considered frozen and has not changed over several consecutive
* LogMiner query batches.
*
* @param scnFreezeCount number of times the system change number is considered frozen
*/
public void setScnFreezeCount(long scnFreezeCount) {
this.scnFreezeCount.set(scnFreezeCount);
}
/**
* Sets the duration of the last LogMiner query execution.
*

View File

@ -1177,9 +1177,11 @@ protected void warnPotentiallyStuckScn(Scn previousOffsetScn, Map<Integer, Scn>
previousOffsetScn,
previousOffsetCommitScns);
metrics.incrementScnFreezeCount();
counters.stuckCount = 0;
}
}
else {
metrics.setScnFreezeCount(0);
counters.stuckCount = 0;
}
}
@ -1674,8 +1676,8 @@ private Scn getLastScnToAbandonFallbackByTransactionChangeTime(Duration retentio
* Wrapper for all counter variables
*
*/
protected class Counters {
public int stuckCount;
protected static class Counters {
public int stuckCount; // it will be reset after 25 mining session iterations or if offset SCN changes
public int dmlCount;
public int ddlCount;
public int insertCount;
@ -1687,7 +1689,6 @@ protected class Counters {
public long rows;
public void reset() {
stuckCount = 0;
dmlCount = 0;
ddlCount = 0;
insertCount = 0;