<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:16 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-1301] Question about DB.setReadOnly</title>
                <link>https://jira.mongodb.org/browse/JAVA-1301</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;we used the now deprecated setReadOnly API to ensure that some processes don&apos;t have write access to certain DBs in a replica set. These processes can transition from a state of having write access to a state with read-only access without having to reconnect to mongo, which is something the above API provided us with. Now that the API got deprecated in 2.12.2 I seem to be unable to find a proper alternative&lt;/p&gt;</description>
                <environment></environment>
        <key id="144909">JAVA-1301</key>
            <summary>Question about DB.setReadOnly</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="-1">Unassigned</assignee>
                                    <reporter username="sumit.gupta15">Sumit Gupta</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Jul 2014 19:38:28 +0000</created>
                <updated>Wed, 11 Sep 2019 19:12:31 +0000</updated>
                            <resolved>Thu, 31 Jul 2014 15:53:16 +0000</resolved>
                                                                    <component>Write Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="677660" author="jeff.yemin" created="Thu, 31 Jul 2014 15:53:17 +0000"  >&lt;p&gt;I&apos;m going to close this, but please feel free to comment further if you have additional questions.&lt;/p&gt;</comment>
                            <comment id="641010" author="jeff.yemin" created="Tue, 1 Jul 2014 19:52:34 +0000"  >&lt;p&gt;Hi Sumit,&lt;/p&gt;

&lt;p&gt;There is no alternative, and furthermore setReadOnly has never been implemented correctly.  Looking at the code, the only operations that it prevents are ensureIndex and save, and even worse, the operations just fail silently without throwing an exception.  &lt;/p&gt;

&lt;p&gt;I would suggest that instead of relying on the driver for this, you put in place a guard in your application code to toggle write access to different databases.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on 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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrganj:</customfieldvalue>

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