Uploaded image for project: 'Kafka Connector'
  1. Kafka Connector
  2. KAFKA-395

Fix custom Delete write model strategy support

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.11.2
    • Affects Version/s: 1.11.1
    • Component/s: Configuration, Sink
    • Not Needed

      Hello team,

      we are configuring a mongo sink connector using confluent.

      My settings were perfect as written in the docs, but only Insert and Update worked, but Delete did not work.

      To create the DeleteOneWrite model,

      "document.id.strategy" was set to PartialKeyStrategy and allowlist.

      Of course "delete.on.null.values" : true ;
       "delete.writemodel.strategy" is the default value, DeleteOneDefaultStrategy
      But it failed to handle the tombstone event and I found the following bug in MongoSinkTopicConfig:

      As mentioned in the docs, with the id strategy to create DeleteOneModel

      FullKeyStrategy, PartialKeyStrategy, ProvidedInKeyStrategy

      You must create a DeleteOneDefaultStrategy object in one of three ways, but
      We discovered something impossible during the current validation process.

      Below is the code.

      1. DELETE_WRITEMODEL_STRATEGY_CONFIG must be empty to create with 3 id strategies

       

      2. Could not input "" because of Validators.matching(FULLY_QUALIFIED_CLASS_NAME)

       

      3. DELETE_WRITEMODEL_STRATEGY_CONFIG cannot be empty because a default value exists.

       

      Thank you.

        1. image-2024-01-07-02-27-12-883.png
          image-2024-01-07-02-27-12-883.png
          110 kB
        2. image-2024-01-07-02-28-56-180.png
          image-2024-01-07-02-28-56-180.png
          35 kB
        3. image-2024-01-07-02-30-57-665.png
          image-2024-01-07-02-30-57-665.png
          12 kB

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            tlsdnwn55@naver.com WooJoo Shin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: