<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:00:11 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-3687] Observable.zip().head() often emits null</title>
                <link>https://jira.mongodb.org/browse/JAVA-3687</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I have this code stanza in a repository&apos;s fetchVideos() method:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;val find = collection.find(query).skip(numToSkip).limit(videosPerPage)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160; .sort(ascending(&quot;title&quot;)).collect()&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;val count = collection.countDocuments(query)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;val zip = find.zip(count)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;zip.head()&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;It is intended to return a future containing a tuple of:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a subset of the Video objects in the database which match the given query filter&lt;/li&gt;
	&lt;li&gt;the total count of Video objects in the database which match the given query filter&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;so, a&#160;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Future[(Seq&lt;span class=&quot;error&quot;&gt;&amp;#91;Video&amp;#93;&lt;/span&gt;, Long)]&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;to enable pagination of search results for videos.&lt;/p&gt;

&lt;p&gt;Instead, it often returns null as the future value.&#160; Not always, but usually.&#160; When null is not the future value, the result is often correct, though not always.&lt;/p&gt;

&lt;p&gt;I have since gone on to serialize the two database accesses using a flatMap(), and that works as expected, but it seems to me like a bug that the above parallelization of these accesses does not also work.&#160;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1283380">JAVA-3687</key>
            <summary>Observable.zip().head() often emits null</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="jeff@reliantsoftwareeng.com">Jeff Mather</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Mar 2020 05:07:35 +0000</created>
                <updated>Sat, 28 Oct 2023 11:21:43 +0000</updated>
                            <resolved>Wed, 15 Apr 2020 13:49:16 +0000</resolved>
                                    <version>4.0.2</version>
                                    <fixVersion>4.0.3</fixVersion>
                    <fixVersion>4.1.0</fixVersion>
                                    <component>API</component>
                    <component>Scala</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3040497" author="xgen-internal-githook" created="Wed, 15 Apr 2020 13:48:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross.lawley@gmail.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: ZipObservable fix&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-3687&quot; title=&quot;Observable.zip().head() often emits null&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-3687&quot;&gt;&lt;del&gt;JAVA-3687&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: 4.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/7d35c2ce5addf9f0cd8671cd1f5706a7d5e360c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/7d35c2ce5addf9f0cd8671cd1f5706a7d5e360c2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3040495" author="xgen-internal-githook" created="Wed, 15 Apr 2020 13:48:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross.lawley@gmail.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: ZipObservable fix&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-3687&quot; title=&quot;Observable.zip().head() often emits null&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-3687&quot;&gt;&lt;del&gt;JAVA-3687&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a202e33e4bd81247242f0c6b8c5d479600a6c0e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a202e33e4bd81247242f0c6b8c5d479600a6c0e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3038465" author="ross@10gen.com" created="Tue, 14 Apr 2020 11:36:29 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/rozza/mongo-java-driver/pull/376&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/rozza/mongo-java-driver/pull/376&lt;/a&gt;&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|hwmzxj:</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>