<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:17 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>[JAVA-1309] REPLICA_ACKNOWLEDGED not working at the time of arbiter Node</title>
                <link>https://jira.mongodb.org/browse/JAVA-1309</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I have 3 mongodb node setup like Primary, Secondary and an Arbiter.&lt;br/&gt;
In this case, if Secondary node is down then Write Concern REPLICA_ACKNOWLEDGED is not working. It is trying to replicate data with second node. But Arbiter node doesn&apos;t have data replication. So i am unable to read the data from primary node due to Primary node gets locked at the time of write operation which is not acknowledge by secondary node.&lt;/p&gt;</description>
                <environment>Linux OS </environment>
        <key id="146152">JAVA-1309</key>
            <summary>REPLICA_ACKNOWLEDGED not working at the time of arbiter Node</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="9">Done</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="kalirajb">Kaliraj</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Wed, 9 Jul 2014 11:02:02 +0000</created>
                <updated>Wed, 13 Aug 2014 09:29:16 +0000</updated>
                            <resolved>Wed, 13 Aug 2014 09:29:16 +0000</resolved>
                                    <version>2.12.2</version>
                                                    <component>Write Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="689143" author="ross@10gen.com" created="Wed, 13 Aug 2014 09:29:16 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kalirajb&quot; class=&quot;user-hover&quot; rel=&quot;kalirajb&quot;&gt;kalirajb&lt;/a&gt; I don&apos;t think there anything else I can do to help with this ticket. &lt;/p&gt;

&lt;p&gt;I have noted a server ticket that may be of interest and worth voting for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14539&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;SERVER-14539&lt;/a&gt; which would help ensure acknowledged if the secondary went down in your replicaset.&lt;/p&gt;</comment>
                            <comment id="653119" author="ross@10gen.com" created="Wed, 9 Jul 2014 15:16:36 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kalirajb&quot; class=&quot;user-hover&quot; rel=&quot;kalirajb&quot;&gt;kalirajb&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I can&apos;t  reproduce that it is blocking, as waiting for write concern result yields the lock - so that other processes can continue to write and read.  However, if all your processes are using the same write concern then each one will block until the write concern is satisfied or the operation it times out.&lt;/p&gt;

&lt;p&gt;For your setup 1 Primary, 1 Secondary and 1 Arbiter this write concern ensures you have two copies of your data.  However, it has the fail case of a single node, so to improve resiliency replacing the arbiter with a secondaries would be better for this write concern.&lt;/p&gt;

&lt;p&gt;You can change the Write Concern at any time using the &lt;tt&gt;setWriteConcern()&lt;/tt&gt; method on the MongoClient, Database or Collection. However, the overhead of checking the replica set status to see if a Secondary is down, would be prohibitive. Given your configuration and if acknowledged writes are acceptable when there is only a single data node - wouldn&apos;t that be a better default?&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="652981" author="kalirajb" created="Wed, 9 Jul 2014 13:58:39 +0000"  >&lt;p&gt;Hi Ross,&lt;/p&gt;

&lt;p&gt;Yes, i am unable to write or read with other Threads due to MongoDB Database lock(in 2.4.X)/ collection lock(in 2.6.X) at the time of write concern. So it wouldn&apos;t allow for other Thread to Read or Write in Primary Node.&lt;br/&gt;
In this case, i am explicitly mentioned that need to replicate data to secondary node. Because my write should be in primary and  read preference should be in secondary for improve my application performance.&lt;/p&gt;

&lt;p&gt;Is there anything, i can dynamically change Write concern from REPLICA_ACKNOWLEDGED to ACKNOWLEDGED at the time of secondary node is down?&lt;/p&gt;

&lt;p&gt;Kaliraj&lt;/p&gt;</comment>
                            <comment id="652902" author="ross@10gen.com" created="Wed, 9 Jul 2014 12:52:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kalirajb&quot; class=&quot;user-hover&quot; rel=&quot;kalirajb&quot;&gt;kalirajb&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Your correct - the semantics for &lt;tt&gt;REPLICA_ACKNOWLEDGED&lt;/tt&gt; are:&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;
&lt;p&gt;With replica acknowledged write concern, you can guarantee that the write operation propagates to additional members of  the replica set.&lt;/p&gt;&lt;/blockquote&gt; &lt;a href=&quot;http://docs.mongodb.org/manual/core/write-concern/#replica-acknowledged&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;replica-acknowledged&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as you have a 3 node replicaSet with an arbiter and the Secondary is down then it is impossible for the operation to propagate to other members of the replicaSet until the Secondary comes online again and can start replicating again.  The arbiter node is passive and only takes part in the election process for declaring primaries.&lt;/p&gt;

&lt;p&gt;For more information see the &lt;a href=&quot;http://docs.mongodb.org/manual/core/replica-set-write-concern/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Write Concern for Replica Sets&lt;/a&gt; documentation.&lt;/p&gt;

&lt;p&gt;Any write with a write concern will block that thread until the write concern is satisfied or it has timed out. However, other threads should still be able to read and write from the database.&lt;/p&gt;

&lt;p&gt;Is that not what you are seeing?&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;

</comment>
                    </comments>
                    <attachments>
                            <attachment id="47295" name="DatabaseUtil.java" size="4493" author="kalirajb" created="Wed, 9 Jul 2014 11:02:02 +0000"/>
                    </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs0cpz:</customfieldvalue>

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