<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:57 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[KAFKA-255] Add UpdateOneDefaultStrategy</title>
                <link>https://jira.mongodb.org/browse/KAFKA-255</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;Currently the default write model strategy is replace, there has been requests for performing an update.&#160;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;br/&gt;
replace one (current default) is an upsert, however if the document exists it replaces the whole document with the new one. The problem can be seen if the existing document is:&lt;br/&gt;
{&lt;tt&gt;_id: 1, a: 0, b: 0, c:0&lt;/tt&gt;}&lt;br/&gt;
and you replace with&#160;&lt;br/&gt;
{&lt;tt&gt;_id: 1, a: 1&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;the destination document will be&#160;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;}}{{{_id: 1, a: 1&lt;/tt&gt;}{{}}&lt;br/&gt;
{{}}&lt;br/&gt;
not&lt;br/&gt;
{&lt;tt&gt;_id: 1, a: 1,&lt;/tt&gt;&lt;tt&gt;b: 0, c:0&lt;/tt&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;


&lt;p&gt;We should add a UpdateOneDefaultStrategy such that the destination document in this scenario will be&lt;br/&gt;
{&lt;tt&gt;_id: 1, a: 1,&lt;/tt&gt;&lt;tt&gt;b: 0, c:0&lt;/tt&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1904877">KAFKA-255</key>
            <summary>Add UpdateOneDefaultStrategy</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="robert.walters@mongodb.com">Robert Walters</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Oct 2021 10:32:42 +0000</created>
                <updated>Sat, 28 Oct 2023 10:46:13 +0000</updated>
                            <resolved>Fri, 11 Aug 2023 10:31:02 +0000</resolved>
                                                    <fixVersion>1.11.0</fixVersion>
                                    <component>Sink</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="5628189" author="xgen-internal-githook" created="Fri, 11 Aug 2023 10:30:48 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross@mongodb.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: Added UpdateOneDefaultStrategy (#144)&lt;/p&gt;

&lt;p&gt;A WriteStrategy that performs a `$set` upsert operation.&lt;br/&gt;
For scenarios where the topic data contains fragments of the&lt;br/&gt;
desired data in MongoDB&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-255&quot; title=&quot;Add UpdateOneDefaultStrategy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-255&quot;&gt;&lt;del&gt;KAFKA-255&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-kafka/commit/358ce92d1a490eebab74f6aeb18a6d7c5f23243b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-kafka/commit/358ce92d1a490eebab74f6aeb18a6d7c5f23243b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5622636" author="ross@10gen.com" created="Wed, 9 Aug 2023 10:57:14 +0000"  >&lt;p&gt;Add &lt;tt&gt;UpdateOneDefaultStrategy&lt;/tt&gt; to the &lt;a href=&quot;https://www.mongodb.com/docs/kafka-connector/master/sink-connector/configuration-properties/write-strategies/#strategies&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;strategies list&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Description:&lt;br/&gt;
Updates at most one document in MongoDB that matches a sink record by the _id field. If no documents match, insert the sink record as a new document. Will only update fields present in the sink record, so can be used in scenarios where the sink record only contains fragements of the store data in MongoDB.&lt;br/&gt;
Apply the following configuration to your sink connector to specify this setting:&lt;/p&gt;

&lt;p&gt;writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneDefaultStrategy&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY23Q4</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3mmh:0400000950l</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>