DBZ-5005 adjust LogMiner batch size based on comparison with currently used batch size
This commit is contained in:
parent
9ad9a5f444
commit
f698a59481
@ -139,6 +139,7 @@ Guy Korland
|
|||||||
Guy Pascarella
|
Guy Pascarella
|
||||||
Grzegorz Kołakowski
|
Grzegorz Kołakowski
|
||||||
Jacob Gminder
|
Jacob Gminder
|
||||||
|
Jan Doms
|
||||||
Jan Hendrik Dolling
|
Jan Hendrik Dolling
|
||||||
Jason Schweier
|
Jason Schweier
|
||||||
Jiabao Sun
|
Jiabao Sun
|
||||||
|
@ -607,16 +607,16 @@ private Scn calculateEndScn(OracleConnection connection, Scn startScn, Scn prevE
|
|||||||
streamingMetrics.setCurrentScn(currentScn);
|
streamingMetrics.setCurrentScn(currentScn);
|
||||||
|
|
||||||
// Add the current batch size to the starting system change number
|
// Add the current batch size to the starting system change number
|
||||||
Scn topScnToMine = startScn.add(Scn.valueOf(streamingMetrics.getBatchSize()));
|
final Scn currentBatchSizeScn = Scn.valueOf(streamingMetrics.getBatchSize());
|
||||||
|
Scn topScnToMine = startScn.add(currentBatchSizeScn);
|
||||||
|
|
||||||
// Control adjusting batch size
|
// Control adjusting batch size
|
||||||
boolean topMiningScnInFarFuture = false;
|
boolean topMiningScnInFarFuture = false;
|
||||||
final Scn defaultBatchScn = Scn.valueOf(connectorConfig.getLogMiningBatchSizeDefault());
|
if (topScnToMine.subtract(currentScn).compareTo(currentBatchSizeScn) > 0) {
|
||||||
if (topScnToMine.subtract(currentScn).compareTo(defaultBatchScn) > 0) {
|
|
||||||
streamingMetrics.changeBatchSize(false, connectorConfig.isLobEnabled());
|
streamingMetrics.changeBatchSize(false, connectorConfig.isLobEnabled());
|
||||||
topMiningScnInFarFuture = true;
|
topMiningScnInFarFuture = true;
|
||||||
}
|
}
|
||||||
if (currentScn.subtract(topScnToMine).compareTo(defaultBatchScn) > 0) {
|
if (currentScn.subtract(topScnToMine).compareTo(currentBatchSizeScn) > 0) {
|
||||||
streamingMetrics.changeBatchSize(true, connectorConfig.isLobEnabled());
|
streamingMetrics.changeBatchSize(true, connectorConfig.isLobEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user