Summary
OLR emits ~0.3% phantom INSERT/UPDATE events on tables with LOB columns (CLOB/BLOB) on Oracle RAC. These are rows that were never committed to the source database.
This is a follow-up to #15, which was partially fixed by PR #16 (restored FLG_ROLLBACK_OP0504 check, extended phantom undo detection). The remaining phantoms cannot be eliminated at the raw redo level.
Root Cause
Oracle's internal LOB segment management generates redo records that are indistinguishable from user DML. Only Oracle's COMMITTED_DATA_ONLY mode (used internally by LogMiner) can filter them, using Oracle-internal state not available in the redo stream.
Full investigation: documentation/LOB-PHANTOM-INVESTIGATION-REPORT.md
Key findings:
- Phantom events are Oracle's internal LOB maintenance ops embedded inside real user transactions
- Same phantom row re-appears across multiple unrelated committed transactions
- All investigated signals (dataObj, bdba+slot, suppLogBdba, opcode pairing) failed to reliably discriminate internal from user ops
- Non-LOB tables: 100% accurate (verified across 69K+ events, 41K+ rows)
Current Workaround
skip-lob-tables format option (commit f1243f1):
{ "format": { "skip-lob-tables": 1 } }
When enabled, OLR silently skips all DML events for tables with LOB columns. Users can replicate LOB tables through LogMiner (COMMITTED_DATA_ONLY) while using OLR for non-LOB tables.
Impact
| Use case |
Status |
| Non-LOB tables on RAC |
100% accurate |
LOB tables with skip-lob-tables: 1 |
No events emitted (use LogMiner) |
| LOB tables without workaround |
~0.3% phantom events |
What Would Fix This
A fix would require one of:
- Oracle exposing LOB-internal operation metadata in redo (unlikely)
- OLR deferring LOB transaction emission and waiting for potential rollbacks (adds latency)
- OLR emitting compensating DELETE events after detecting rollbacks (requires keeping emitted XIDs in memory)
Options 2 and 3 are architecturally complex and may not catch all cases.
Related
Summary
OLR emits ~0.3% phantom INSERT/UPDATE events on tables with LOB columns (CLOB/BLOB) on Oracle RAC. These are rows that were never committed to the source database.
This is a follow-up to #15, which was partially fixed by PR #16 (restored
FLG_ROLLBACK_OP0504check, extended phantom undo detection). The remaining phantoms cannot be eliminated at the raw redo level.Root Cause
Oracle's internal LOB segment management generates redo records that are indistinguishable from user DML. Only Oracle's
COMMITTED_DATA_ONLYmode (used internally by LogMiner) can filter them, using Oracle-internal state not available in the redo stream.Full investigation:
documentation/LOB-PHANTOM-INVESTIGATION-REPORT.mdKey findings:
Current Workaround
skip-lob-tablesformat option (commit f1243f1):When enabled, OLR silently skips all DML events for tables with LOB columns. Users can replicate LOB tables through LogMiner (
COMMITTED_DATA_ONLY) while using OLR for non-LOB tables.Impact
skip-lob-tables: 1What Would Fix This
A fix would require one of:
Options 2 and 3 are architecturally complex and may not catch all cases.
Related