Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-612

UnwrapFromMongoDbEnvelope fails when encountering $unset operator

XMLWordPrintable

      Issuing a statement such as the following causes the MongoDB unwrap SMT to fail:

      db.customers.update(
          { _id : NumberLong("1004") },
          { $unset : { first_name: "" } } 
      );
      
      connect_1    | org.bson.BsonInvalidOperationException: Document does not contain key $set
      connect_1    | 	at org.bson.BsonDocument.throwIfKeyAbsent(BsonDocument.java:844)
      connect_1    | 	at org.bson.BsonDocument.getDocument(BsonDocument.java:135)
      connect_1    | 	at io.debezium.connector.mongodb.transforms.UnwrapFromMongoDbEnvelope.apply(UnwrapFromMongoDbEnvelope.java:82)
      connect_1    | 	at org.apache.kafka.connect.runtime.TransformationChain.apply(TransformationChain.java:38)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:464)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:287)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:198)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:166)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:170)
      connect_1    | 	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214)
      connect_1    | 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      connect_1    | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      connect_1    | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      connect_1    | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      connect_1    | 	at java.lang.Thread.run(Thread.java:748)
      

              renatomefi Renato Mefi (Inactive)
              gunnar.morling Gunnar Morling
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: