<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:37 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-113] Writemodel upsert strategy which can target multiple fields</title>
                <link>https://jira.mongodb.org/browse/KAFKA-113</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;Hello again,&lt;/p&gt;

&lt;p&gt;We recently upgraded our sharded mongodb cluster to 4.2.0+ and encountered an issue where we wanted upserts but the mongodb connector creates upserts which only match on the _id field and our sharded collections have compound shard keys.&lt;/p&gt;

&lt;p&gt;I created a writemodel strategy which creates upserts that can be configured to target multiple fields, hopefully it can be of use. As before I have included tests,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-kafka/pull/16&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-kafka/pull/16&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

&lt;p&gt;-Pat&lt;/p&gt;</description>
                <environment></environment>
        <key id="1377035">KAFKA-113</key>
            <summary>Writemodel upsert strategy which can target multiple fields</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="13202">Works as Designed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="patwakeem@gmail.com">Pat W</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Jun 2020 12:51:55 +0000</created>
                <updated>Fri, 27 Oct 2023 11:54:16 +0000</updated>
                            <resolved>Tue, 8 Sep 2020 08:44:59 +0000</resolved>
                                                    <fixVersion>1.3.0</fixVersion>
                                    <component>Sink</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3377928" author="ross@10gen.com" created="Tue, 8 Sep 2020 08:44:59 +0000"  >&lt;p&gt;Closing as works as designed for now but happy to review if there is a scenario where that wont be the case.&lt;/p&gt;</comment>
                            <comment id="3377927" author="ross@10gen.com" created="Tue, 8 Sep 2020 08:44:09 +0000"  >&lt;p&gt;In review you should be able to use the &lt;tt&gt;PartialValueStrategy&lt;/tt&gt; to generate the shardkey match.  See: &lt;a href=&quot;https://docs.mongodb.com/kafka-connector/v1.2/kafka-sink-postprocessors/#writemodel-strategy-business-keys&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;writemodel strategy business keys&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-155&quot; title=&quot;Allow use of dotted notation when for id strategies.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-155&quot;&gt;&lt;del&gt;KAFKA-155&lt;/del&gt;&lt;/a&gt; highlights a bug where it is possible that the Replace strategy does not correctly match the compound key and that is due to be fixed in 1.3.0.&lt;/p&gt;

&lt;p&gt;I think the combination of the &lt;tt&gt;PartialValueStrategy&lt;/tt&gt; and the fix coming in &lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-155&quot; title=&quot;Allow use of dotted notation when for id strategies.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-155&quot;&gt;&lt;del&gt;KAFKA-155&lt;/del&gt;&lt;/a&gt; should handle shard key / compound key scenarios. Let me know if that is not the case.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000nnm7JQAQ]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx76s7:</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>