-
Bug
-
Resolution: Done
-
Major
-
1.6.0.Alpha1
-
None
-
False
-
False
-
Undefined
-
hasLogSwitchOccurred() does not detect all sequence change if we have more than one pulling thread. This is causing some missing SCN dml being returned from the logming, query, and caused data lost.
the getCurrentRedoLogSequences() only return the first sequence# from the query.
private List<BigInteger> getCurrentRedoLogSequences() throws SQLException { return jdbcConnection.queryAndMap(SqlUtils.currentRedoLogSequenceQuery(), rs -> { List<BigInteger> sequences = new ArrayList<>(); if (rs.next()) { <---- ONLY one being returned. sequences.add(new BigInteger(rs.getString(1))); } return sequences; }); }
For our case, we have 2 threads and 2 sequences number. please see the screen shot attached.
After we changed the code (if -> while), we get the correct list of sequence, and you can see the log is showing
Current log sequence(s) is now [23662, 22350], was [22349, 23659]
and our missing data issue is fixed.