DBZ-137 Added todos and a try-with-resource blocks
This commit is contained in:
parent
d4b0143cdd
commit
d7c3f04a07
@ -172,14 +172,12 @@ static Set<String> getCurrentRedoLogFiles(Connection connection, LogMinerMetrics
|
||||
String checkQuery = SqlUtils.CURRENT_REDO_LOG_NAME;
|
||||
|
||||
Set<String> fileNames = new HashSet<>();
|
||||
PreparedStatement st = connection.prepareStatement(checkQuery);
|
||||
ResultSet result = st.executeQuery();
|
||||
while (result.next()) {
|
||||
fileNames.add(result.getString(1));
|
||||
LOGGER.trace(" Current Redo log fileName: {} ", fileNames);
|
||||
try(PreparedStatement st = connection.prepareStatement(checkQuery); ResultSet result = st.executeQuery()) {
|
||||
while (result.next()) {
|
||||
fileNames.add(result.getString(1));
|
||||
LOGGER.trace(" Current Redo log fileName: {} ", fileNames);
|
||||
}
|
||||
}
|
||||
st.close();
|
||||
result.close();
|
||||
|
||||
updateRedoLogMetrics(connection, metrics, fileNames);
|
||||
return fileNames;
|
||||
|
@ -130,6 +130,7 @@ public void execute(ChangeEventSourceContext context) {
|
||||
}
|
||||
|
||||
// 1. Configure Log Miner to mine online redo logs
|
||||
// todo: DBZ-137 this step can actually be executed outside the loop at start-up.
|
||||
setNlsSessionParameters(jdbcConnection);
|
||||
checkSupplementalLogging(jdbcConnection, connectorConfig.getPdbName());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user