DBZ-6880 Move some Oracle log messages to DEBUG
This commit is contained in:
parent
9ce0e7d785
commit
b5700a62c9
@ -140,18 +140,18 @@ public static List<LogFile> getLogFilesForOffsetScn(OracleConnection connection,
|
||||
// archive log record
|
||||
LogFile logFile = new LogFile(fileName, firstScn, nextScn, sequence, LogFile.Type.ARCHIVE, thread);
|
||||
if (logFile.getNextScn().compareTo(offsetScn) >= 0) {
|
||||
LOGGER.trace("Archive log {} with SCN range {} to {} sequence {} to be added.", fileName, firstScn, nextScn, sequence);
|
||||
LOGGER.debug("Archive log {} with SCN range {} to {} sequence {} to be added.", fileName, firstScn, nextScn, sequence);
|
||||
archivedLogFiles.add(logFile);
|
||||
}
|
||||
}
|
||||
else if ("ONLINE".equals(type)) {
|
||||
LogFile logFile = new LogFile(fileName, firstScn, nextScn, sequence, LogFile.Type.REDO, CURRENT.equalsIgnoreCase(status), thread);
|
||||
if (logFile.isCurrent() || logFile.getNextScn().compareTo(offsetScn) >= 0) {
|
||||
LOGGER.trace("Online redo log {} with SCN range {} to {} ({}) sequence {} to be added.", fileName, firstScn, nextScn, status, sequence);
|
||||
LOGGER.debug("Online redo log {} with SCN range {} to {} ({}) sequence {} to be added.", fileName, firstScn, nextScn, status, sequence);
|
||||
onlineLogFiles.add(logFile);
|
||||
}
|
||||
else {
|
||||
LOGGER.trace("Online redo log {} with SCN range {} to {} ({}) sequence {} to be excluded.", fileName, firstScn, nextScn, status, sequence);
|
||||
LOGGER.debug("Online redo log {} with SCN range {} to {} ({}) sequence {} to be excluded.", fileName, firstScn, nextScn, status, sequence);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,7 +163,7 @@ else if ("ONLINE".equals(type)) {
|
||||
for (LogFile redoLog : onlineLogFiles) {
|
||||
archivedLogFiles.removeIf(f -> {
|
||||
if (f.getSequence().equals(redoLog.getSequence())) {
|
||||
LOGGER.trace("Removing archive log {} with duplicate sequence {} to {}", f.getFileName(), f.getSequence(), redoLog.getFileName());
|
||||
LOGGER.debug("Removing archive log {} with duplicate sequence {} to {}", f.getFileName(), f.getSequence(), redoLog.getFileName());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -621,7 +621,7 @@ private OffsetDateTime getDatabaseSystemTime(OracleConnection connection) throws
|
||||
* @throws SQLException if mining session failed to start
|
||||
*/
|
||||
public boolean startMiningSession(OracleConnection connection, Scn startScn, Scn endScn, int attempts) throws SQLException {
|
||||
LOGGER.trace("Starting mining session startScn={}, endScn={}, strategy={}, continuous={}",
|
||||
LOGGER.debug("Starting mining session startScn={}, endScn={}, strategy={}, continuous={}",
|
||||
startScn, endScn, strategy, isContinuousMining);
|
||||
try {
|
||||
Instant start = Instant.now();
|
||||
|
@ -261,7 +261,8 @@ public String toString() {
|
||||
", rollbackFlag=" + rollbackFlag +
|
||||
", rsId=" + rsId +
|
||||
", ssn=" + ssn +
|
||||
", redoSql='" + redoSql + '\'' +
|
||||
// Specifically log SQL only if TRACE is enabled; otherwise omit for others
|
||||
", redoSql='" + (LOGGER.isTraceEnabled() ? redoSql : "<omitted>") + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ protected void handleCommit(OraclePartition partition, LogMinerEventRow row) thr
|
||||
final T transaction = getAndRemoveTransactionFromCache(transactionId);
|
||||
if (transaction == null) {
|
||||
handleCommitNotFoundInBuffer(row);
|
||||
LOGGER.trace("Transaction {} not found, commit skipped.", transactionId);
|
||||
LOGGER.debug("Transaction {} not found, commit skipped.", transactionId);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ protected boolean isTransactionUserExcluded(T transaction) {
|
||||
return false;
|
||||
}
|
||||
else if (connectorConfig.getLogMiningUsernameExcludes().contains(transaction.getUserName())) {
|
||||
LOGGER.trace("Skipped transaction with excluded username {}", transaction);
|
||||
LOGGER.debug("Skipped transaction with excluded username {}", transaction);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -640,7 +640,7 @@ else if (connectorConfig.getLogMiningUsernameExcludes().contains(transaction.get
|
||||
*/
|
||||
protected void handleRollback(LogMinerEventRow row) {
|
||||
if (getTransactionCache().containsKey(row.getTransactionId())) {
|
||||
LOGGER.trace("Transaction {} was rolled back.", row.getTransactionId());
|
||||
LOGGER.debug("Transaction {} was rolled back.", row.getTransactionId());
|
||||
finalizeTransactionRollback(row.getTransactionId(), row.getScn());
|
||||
metrics.setActiveTransactions(getTransactionCache().size());
|
||||
metrics.incrementRolledBackTransactions();
|
||||
@ -648,7 +648,7 @@ protected void handleRollback(LogMinerEventRow row) {
|
||||
counters.rollbackCount++;
|
||||
}
|
||||
else {
|
||||
LOGGER.trace("Could not rollback transaction {}, was not found in cache.", row.getTransactionId());
|
||||
LOGGER.debug("Could not rollback transaction {}, was not found in cache.", row.getTransactionId());
|
||||
handleRollbackNotFoundInBuffer(row);
|
||||
}
|
||||
}
|
||||
@ -780,7 +780,7 @@ protected void handleSelectLobLocator(LogMinerEventRow row) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.trace("SEL_LOB_LOCATOR: {}", row);
|
||||
LOGGER.debug("SEL_LOB_LOCATOR: {}", row);
|
||||
final TableId tableId = row.getTableId();
|
||||
final Table table = getSchema().tableFor(tableId);
|
||||
if (table == null) {
|
||||
@ -815,7 +815,7 @@ protected void handleLobWrite(LogMinerEventRow row) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.trace("LOB_WRITE: scn={}, tableId={}, changeTime={}, transactionId={}",
|
||||
LOGGER.debug("LOB_WRITE: scn={}, tableId={}, changeTime={}, transactionId={}",
|
||||
row.getScn(), row.getTableId(), row.getChangeTime(), row.getTransactionId());
|
||||
|
||||
final TableId tableId = row.getTableId();
|
||||
@ -844,7 +844,7 @@ private void handleLobErase(LogMinerEventRow row) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.trace("LOB_ERASE: {}", row);
|
||||
LOGGER.debug("LOB_ERASE: {}", row);
|
||||
final TableId tableId = row.getTableId();
|
||||
final Table table = getSchema().tableFor(tableId);
|
||||
if (table == null) {
|
||||
@ -990,7 +990,7 @@ protected void handleDataEvent(LogMinerEventRow row) throws SQLException, Interr
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.trace("DML: {}", row);
|
||||
LOGGER.debug("DML: {}", row);
|
||||
LOGGER.trace("\t{}", row.getRedoSql());
|
||||
|
||||
// Oracle LogMiner reports LONG data types as STATUS=2 on UPDATE statements but there is no
|
||||
|
@ -135,7 +135,7 @@ private void acceptDmlEvent(DmlEvent event) throws InterruptedException {
|
||||
|
||||
final Table table = schema.tableFor(event.getTableId());
|
||||
if (table == null) {
|
||||
LOGGER.trace("Unable to locate table '{}' schema, ignoring event.", event.getTableId());
|
||||
LOGGER.debug("Unable to locate table '{}' schema, ignoring event.", event.getTableId());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ else if (event instanceof XmlWriteEvent || event instanceof XmlEndEvent) {
|
||||
private void acceptLobManipulationEvent(LogMinerEvent event) {
|
||||
if (!currentLobDetails.isInitialized()) {
|
||||
// should only happen when we start streaming in the middle of a LOB transaction (DBZ-4367)
|
||||
LOGGER.trace("Got LOB manipulation event without preceding LOB selector; ignoring {} {}.", event.getEventType(), event);
|
||||
LOGGER.debug("Got LOB manipulation event without preceding LOB selector; ignoring {} {}.", event.getEventType(), event);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ else if (!getConfig().isLobEnabled()) {
|
||||
for (String eventKey : eventKeys) {
|
||||
final LogMinerEvent event = getEventCache().get(eventKey);
|
||||
if (event != null && event.getRowId().equals(row.getRowId())) {
|
||||
LOGGER.trace("Undo applied for event {}.", event);
|
||||
LOGGER.debug("Undo applied for event {}.", event);
|
||||
getEventCache().remove(eventKey);
|
||||
return;
|
||||
}
|
||||
@ -146,7 +146,7 @@ private List<String> getTransactionKeysWithPrefix(String prefix) {
|
||||
protected void processRow(OraclePartition partition, LogMinerEventRow row) throws SQLException, InterruptedException {
|
||||
final String transactionId = row.getTransactionId();
|
||||
if (isRecentlyProcessed(transactionId)) {
|
||||
LOGGER.trace("Transaction {} has been seen by connector, skipped.", transactionId);
|
||||
LOGGER.debug("Transaction {} has been seen by connector, skipped.", transactionId);
|
||||
return;
|
||||
}
|
||||
super.processRow(partition, row);
|
||||
@ -196,7 +196,7 @@ public boolean hasNext() {
|
||||
while (index < count) {
|
||||
nextEvent = getEventCache().get(transaction.getEventId(index));
|
||||
if (nextEvent == null) {
|
||||
LOGGER.trace("Event {} must have been undone, skipped.", index);
|
||||
LOGGER.debug("Event {} must have been undone, skipped.", index);
|
||||
// There are situations where an event will be removed from the cache when it is
|
||||
// undone by the undo-row flag. The event id isn't re-used in this use case so
|
||||
// the iterator automatically detects null entries and skips them by advancing
|
||||
|
Loading…
Reference in New Issue
Block a user