<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57: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-2452] Unable to find a document using _id </title>
                <link>https://jira.mongodb.org/browse/JAVA-2452</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Environment:&lt;br/&gt;
1.	MongoDB Enterprise 3.2.10 using Wired Tiger storage engine&lt;br/&gt;
2.	Write concern set to W1 with Journal = true&lt;br/&gt;
3.	Reads are done on the primary, not the replica set&lt;/p&gt;

&lt;p&gt;The issue we are seeing is in a very short period (&amp;lt; 10 ms) a document is created in a collection and then queried back.  On the query back (using _id field) the document is not found.  If queried later by _id it is found.&lt;/p&gt;

&lt;p&gt;Is this the expected behavior for Mongo 3.2.10?  One observation was this issue starting occurring when we upgraded from 3.0 Mongo to 3.2 Mongo enterprise version.&lt;/p&gt;</description>
                <environment></environment>
        <key id="354118">JAVA-2452</key>
            <summary>Unable to find a document using _id </summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="schen@curaspan.com">Shiuzi Chen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Feb 2017 19:37:31 +0000</created>
                <updated>Wed, 11 Sep 2019 19:10:58 +0000</updated>
                            <resolved>Tue, 21 Feb 2017 10:22:15 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1504757" author="ross@10gen.com" created="Tue, 21 Feb 2017 10:22:15 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schen%40curaspan.com&quot; class=&quot;user-hover&quot; rel=&quot;schen@curaspan.com&quot;&gt;schen@curaspan.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user mailinglist&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a boarder audience there.  If your business requires an answer from MongoDB within a time frame then we do offer &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Useful information to include would be the Mongo Java Driver version, the MongoDB setup eg: sharded replicaset cluster or replicaset and the readPreference.  Also, it looks like you are using Spring Data so please include the version information as well.&lt;/p&gt;

&lt;p&gt;If you do follow up via one of the options above please post a link and I will endeavour to follow the conversation there.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1504487" author="emily.stolfo@10gen.com" created="Mon, 20 Feb 2017 19:42:51 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schen%40curaspan.com&quot; class=&quot;user-hover&quot; rel=&quot;schen@curaspan.com&quot;&gt;schen@curaspan.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No problem, I&apos;ll switch the ticket over to Java.&lt;br/&gt;
Thanks!&lt;br/&gt;
Emily&lt;/p&gt;</comment>
                            <comment id="1504479" author="schen@curaspan.com" created="Mon, 20 Feb 2017 18:55:32 +0000"  >&lt;p&gt;We are using Java. I think that I selected the wrong project. Any way to transform to different project or I have to create a new one. Thanks!&lt;/p&gt;</comment>
                            <comment id="1504469" author="emily.stolfo@10gen.com" created="Mon, 20 Feb 2017 18:30:02 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schen%40curaspan.com&quot; class=&quot;user-hover&quot; rel=&quot;schen@curaspan.com&quot;&gt;schen@curaspan.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which language are you using to connect to MongoDB? You&apos;ve created this ticket in the Mongoid project, which is the Ruby MongoDB ODM but I&apos;m afraid there might be some confusion somewhere.&lt;br/&gt;
Thanks&lt;br/&gt;
Emily&lt;/p&gt;</comment>
                            <comment id="1504410" author="schen@curaspan.com" created="Mon, 20 Feb 2017 16:20:59 +0000"  >

&lt;p&gt;Maybe I picked up wrong project. I can not find those&lt;br/&gt;
files mongodi.yml and Gemfile.lock. &lt;/p&gt;



&lt;p&gt;For #2, the write and the read are done via two separate&lt;br/&gt;
API calls,&#160; completely different code&lt;br/&gt;
paths and threads.&#160; I&#8217;m not sure how&lt;br/&gt;
useful the code below is as we are using spring data and querydsl to interact&lt;br/&gt;
with MongoDB, but the write looks something like this:&lt;/p&gt;

&lt;p&gt;simpleRepository.save(episode);&lt;br/&gt;
where simpleRepository is defined as: &lt;br/&gt;
public interface PatientEpisodeRepository extends&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;br/&gt;
MongoRepository&amp;lt;PatientEpisode, String&amp;gt;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;br/&gt;
QueryDslPredicateExecutor&amp;lt;PatientEpisode&amp;gt;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;br/&gt;
CustomPatientEpisodeRepository { }&lt;/p&gt;

&lt;p&gt;And the read looks something like this:&lt;/p&gt;

&lt;p&gt;Predicate queryDsl =&lt;br/&gt;
EPISODE.orgId.eq(orgId).and(EPISODE.id.eq(patientEpisodeId)).and(EPISODE.deleted.ne(true));&lt;br/&gt;
Query mongoQuery = RepositoryUtils.convert(queryDsl);&lt;br/&gt;
mongoOperation.findOne(mongoQuery, PatientEpisode.class);&lt;/p&gt;


&lt;p&gt;we did a hotfix to the production app today to retry the&lt;br/&gt;
query every 15 ms for up to 7 times to see if it could find the episode on the&lt;br/&gt;
retry.&#160; The hotfix fixed the issue 100%,&lt;br/&gt;
so now we know that is a lag between when we write vs read.&#160; These numbers are just since 6AM today.&#160; One time it took 6 retires (90ms)&#160; &lt;br/&gt;
&#160;&lt;br/&gt;
Can you add this information to the ticket:&lt;br/&gt;
Service&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;retries&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; count&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; percent per service&lt;br/&gt;
HospitalInternalPatientEpisodeSaveService&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 687&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 99.85%&lt;br/&gt;
HospitalInternalPatientEpisodeSaveService&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0.15%&lt;br/&gt;
PatientServiceManagerImpl&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 173&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 25.15%&lt;br/&gt;
PatientServiceManagerImpl&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 106&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 15.41%&lt;br/&gt;
PatientServiceManagerImpl&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 20&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2.91%&lt;br/&gt;
PatientServiceManagerImpl&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0.15%&lt;br/&gt;
Total&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;                      988&lt;/p&gt;
</comment>
                            <comment id="1500652" author="emily.stolfo@10gen.com" created="Thu, 16 Feb 2017 23:21:27 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schen%40curaspan.com&quot; class=&quot;user-hover&quot; rel=&quot;schen@curaspan.com&quot;&gt;schen@curaspan.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you please provide the following information so we can investigate further?&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Your mongoid.yml file, while being sure to take out any sensitive information&lt;/li&gt;
	&lt;li&gt;The code snippet with the write and then read&lt;/li&gt;
	&lt;li&gt;Your Gemfile.lock&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thanks&lt;br/&gt;
Emily &lt;/p&gt;</comment>
                    </comments>
                    <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|hsv007:</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>