-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Bug report
For bug reports, provide this information, please:
What Debezium connector do you use and what version?
MySQL version 3.3.1-Final and Debezium Embedded Engine.
What is the connector configuration?
<Your answer>
What is the captured database version and mode of deployment?
(E.g. on-premises, with a specific cloud provider, etc.)
<Your answer>
What behavior do you expect?
Given
1. gtidSet1 = UUID1:Range1,UUID2:Range2
2. gtidSet2 = UUID1:Range1
gtidSet1.subtract(gtidSet2) should be UUID2:Range2
What behavior do you see?
`java.lang.NullPointerException: Cannot invoke "io.debezium.connector.mysql.gtid.MySqlGtidSet$UUIDSet.getUUID()" because "other" is null
at io.debezium.connector.mysql.gtid.MySqlGtidSet$UUIDSet.subtract(MySqlGtidSet.java:323)
at io.debezium.connector.mysql.gtid.MySqlGtidSet.lambda$subtract$4(MySqlGtidSet.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:3322)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at io.debezium.connector.mysql.gtid.MySqlGtidSet.subtract(MySqlGtidSet.java:127)`
Do you see the same behaviour using the latest released Debezium version?
(Ideally, also verify with latest Alpha/Beta/CR version)
Yes
Do you have the connector logs, ideally from start till finish?
(You might be asked later to provide DEBUG/TRACE level log)
<Your answer>
How to reproduce the issue using our tutorial deployment?
<Your answer>
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
When the source DB being replicated is restarted it acquires a new server UUID. If the connector shutdown before the restart and re-connected after restart, using the subtract method in this class doesn't act as expected.
Implementation ideas (optional)
Add a nullity check in UUIDSet subtract(UUIDSet other) on other.