OracleConnection, Snapshot mode = "never"

15 views
Skip to first unread message

Lucas Rangel Gazire

unread,
Jul 1, 2024, 2:37:34 PM (2 days ago) Jul 1
to debezium
Hi all!

I was looking at the debezium source code and saw some interesting behavior with my oracle database:
- In the OracleConnection class there's a getAttributeDetails as far as i could understand it registers the tables that i added and all the views relation, is that correct?

There's a snapshot_mode = never, i was wondering if i have all the schemas loaded and absolute guarantee that my tables will not change until i load it again can it be used? Cause i tried and got an error that it is not a valid schema name. So i tried to use custom passing the stream = true only and i got an error:
Cannot invoke "io.debezium.connector.oracle.OracleOffsetContext.getScn()" because "offsetContext" is null
.with("snapshot.mode", "configuration_based")
.with("snapshot.mode.configuration.based.start.stream", true)


Mario Fiore Vitale

unread,
Jul 2, 2024, 3:31:14 AM (yesterday) Jul 2
to debezium
Hi Lucas, 

> In the OracleConnection class there's a getAttributeDetails as far as i could understand it registers the tables that i added and all the views relation, is that correct?

Yes, it is used during initial snapshot (phase 5) - in particular in the method readTableStructure.

> There's a snapshot_mode = never

Never  is not a valid mode for Oracle. Where you find it? And which Debezium version are you using?

> i was wondering if i have all the schemas loaded and absolute guarantee that my tables will not change until i load it again can it be used?

You should be able to just streaming using the configuration based. Can you please share the whole log with the stacktrace of the error?

Thanks, 
Mario.

Lucas Rangel Gazire

unread,
Jul 2, 2024, 9:41:06 AM (20 hours ago) Jul 2
to debezium
Hey Vitale!

> Yes, it is used during initial snapshot (phase 5) - in particular in the method readTableStructure.

So, can i assume that if one of those views are triggered it will trigger an event for the table?

> Never  is not a valid mode for Oracle. Where you find it? And which Debezium version are you using

Found in the source code, but i just checked the comments and it's only valid for the MySql
io.debezium.snapshot.mode.never

> You should be able to just streaming using the configuration based. Can you please share the whole log with the stacktrace of the error?
Yes,  error bellow, as you can see it doesn't have a startScn so i thought it would start with the beginning avaiable data.
 
Mining session stopped due to error.
java.lang.NullPointerException: Cannot invoke "io.debezium.connector.oracle.Scn.compareTo(io.debezium.connector.oracle.Scn)" because "this.startScn" is null
at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:157)
at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:61)
at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:280)
at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:197)
at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:140)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:317)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Producer failure

Lucas Rangel Gazire

unread,
Jul 2, 2024, 10:06:49 AM (19 hours ago) Jul 2
to debezium
Just one more thing, i'm using the
MemoryOffsetBackingStore
Reply all
Reply to author
Forward
0 new messages