View Issue Details

IDProjectCategoryView StatusLast Update
0005033SymmetricDS ProBugpublic2021-07-13 19:48
Reporterpmarzullo Assigned Topmarzullo  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.10 
Target Version3.12.11Fixed in Version3.12.11 
Summary0005033: Oracle Log Miner fails to load transactions when SCN value is too old and gets stuck in loop
DescriptionWhen a pending transaction from sym_context is attempted to be loaded, and the SCN value for the beginning of the transaction is too old, and the next SCN value minus 1 is also too old, then the log mining gets stuck in a loop that never ends.

The minimum value of the pending transaction SCN values is put in as the start SCN, and the next SCN minus 1 is put in as the end SCN. If the start SCN is too old (no redo log is found for that SCN), then the recovery attempts to put in the minimum SCN value from the current redo logs. But when this minimum SCN value is greater than our starting SCN, then the start SCN value is greater than the end SCN value, causing another failure when starting log mining.

In this case, where the minimum SCN value is greater than our end SCN value, then the current pending transactions are not able to be recovered.

We should log the lost transactions and move on.
Steps To Reproduce1. Find the current minimum SCN value from the database:
SELECT "FIRST_CHANGE#" AS FIRST_SCN FROM V$LOG WHERE status = 'CURRENT' ORDER BY \"SEQUENCE#\" DESC
2. Set the sym_context value with a value less than the minimum SCN value:
update sym_context set context_value = <value less than first_change#' where name='log.miner.next.id';
3. Insert/update sym_context with an open transaction less than value just inserted into sym_context for next id:
insert into sym_context (name, context_value, create_time, last_update_time) values('log.miner.open.transactions', '1-1-10',current_timestamp, current_timestamp);
4. Start up SymmetricDS with Oracle log mining.
Tagsdialect: oracle, log miner

Activities

pmarzullo

2021-06-16 13:10

developer   ~0001956

Creating a 3.12.11 release candidate

Issue History

Date Modified Username Field Change
2021-06-16 13:08 pmarzullo New Issue
2021-06-16 13:08 pmarzullo Status new => assigned
2021-06-16 13:08 pmarzullo Assigned To => pmarzullo
2021-06-16 13:08 pmarzullo Tag Attached: dialect: oracle
2021-06-16 13:08 pmarzullo Tag Attached: log-miner
2021-06-16 13:10 pmarzullo Status assigned => resolved
2021-06-16 13:10 pmarzullo Resolution open => fixed
2021-06-16 13:10 pmarzullo Fixed in Version => 3.12.11
2021-06-16 13:10 pmarzullo Note Added: 0001956
2021-07-13 19:48 admin Status resolved => closed
2022-08-09 17:57 admin Tag Renamed log-miner => log miner