<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:00:54 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-3969] Investigate implicit session test failure</title>
                <link>https://jira.mongodb.org/browse/JAVA-3969</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://evergreen.mongodb.com/task/mongo_java_driver_tests_jdk_secure__version~latest_os~linux_topology~replicaset_auth~auth_ssl~ssl_jdk~jdk8_test_82129d04205d9b493ab910cfe3a4b17cf016b41e_21_01_26_23_53_26&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/mongo_java_driver_tests_jdk_secure__version~latest_os~linux_topology~replicaset_auth~auth_ssl~ssl_jdk~jdk8_test_82129d04205d9b493ab910cfe3a4b17cf016b41e_21_01_26_23_53_26&lt;/a&gt;&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415] com.mongodb.reactivestreams.SessionsTest &amp;gt; shouldPassAllOutcomes[server-support.json: Server supports implicit sessions] FAILED&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]     java.lang.AssertionError: {&quot;insert&quot;: &quot;test&quot;, &quot;ordered&quot;: true, &quot;$db&quot;: &quot;session-tests&quot;, &quot;lsid&quot;: {&quot;id&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;30+bYp5xRHKeEJlhLM6GzA==&quot;, &quot;subType&quot;: &quot;04&quot;}}}, &quot;documents&quot;: [{&quot;_id&quot;: 2}]}, {&quot;find&quot;: &quot;test&quot;, &quot;filter&quot;: {&quot;_id&quot;: -1}, &quot;$db&quot;: &quot;session-tests&quot;, &quot;$clusterTime&quot;: {&quot;clusterTime&quot;: {&quot;$timestamp&quot;: {&quot;t&quot;: 1611626597, &quot;i&quot;: 8}}, &quot;signature&quot;: {&quot;hash&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;rCY2jhix6gqpEPNrVXHm16N/4oQ=&quot;, &quot;subType&quot;: &quot;00&quot;}}, &quot;keyId&quot;: 6921880654145650691}}, &quot;lsid&quot;: {&quot;id&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;hNMiwO6jTnG2lGmdTWaHYw==&quot;, &quot;subType&quot;: &quot;04&quot;}}}} expected:&amp;lt;{&quot;id&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;30+bYp5xRHKeEJlhLM6GzA==&quot;, &quot;subType&quot;: &quot;04&quot;}}}&amp;gt; but was:&amp;lt;{&quot;id&quot;: {&quot;$binary&quot;: {&quot;base64&quot;: &quot;hNMiwO6jTnG2lGmdTWaHYw==&quot;, &quot;subType&quot;: &quot;04&quot;}}}&amp;gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]         at org.junit.Assert.fail(Assert.java:89)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]         at org.junit.Assert.failNotEquals(Assert.java:835)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]         at org.junit.Assert.assertEquals(Assert.java:120)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]         at com.mongodb.client.AbstractUnifiedTest.executeOperations(AbstractUnifiedTest.java:561)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[2021/01/26 02:03:17.415]         at com.mongodb.client.AbstractUnifiedTest.shouldPassAllOutcomes(AbstractUnifiedTest.java:373)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="1601463">JAVA-3969</key>
            <summary>Investigate implicit session test failure</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="9">Done</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2021 04:11:29 +0000</created>
                <updated>Mon, 1 Mar 2021 22:30:44 +0000</updated>
                            <resolved>Mon, 1 Mar 2021 22:30:44 +0000</resolved>
                                                                    <component>Reactive Streams</component>
                    <component>Test Coverage</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3640949" author="jeff.yemin" created="Mon, 1 Mar 2021 22:30:44 +0000"  >&lt;p&gt;Opened &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4027&quot; title=&quot;Mono#doOnTerminate does not guarantee execution prior to Subscriber notification&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4027&quot;&gt;&lt;del&gt;JAVA-4027&lt;/del&gt;&lt;/a&gt; to fix the underlying issue&lt;/p&gt;</comment>
                            <comment id="3639917" author="jeff.yemin" created="Mon, 1 Mar 2021 17:00:46 +0000"  >&lt;p&gt;Decided on fourth option, after discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=valentin.male.kovalenko%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;valentin.male.kovalenko@gmail.com&quot;&gt;valentin.male.kovalenko@gmail.com&lt;/a&gt;.  Since we document that Californium is supported, we should ensure that the driver behaves consistently and as expected when using that release.  Therefore, we should stop depending on the behavior of &lt;tt&gt;Mono#doOnTerminate&lt;/tt&gt; being consistent across all releases.  This is easy to do: just wrap the &lt;tt&gt;sinkToCallback&lt;/tt&gt; in another callback that first releases the binding.&lt;/p&gt;</comment>
                            <comment id="3639483" author="jeff.yemin" created="Mon, 1 Mar 2021 14:58:38 +0000"  >&lt;p&gt;Mystery solved.  We&apos;re testing with Californium-S-17 release of Project Reactor.  The behavior for Mono#doOnTerminate mentioned in the previous comment was not specified until a later release of Project Reactor.  Testing with Dysprosium-SR17, I observe the documented behavior and the test no longer fails.&lt;/p&gt;

&lt;p&gt;The question now is what to do about it.  Options include:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Disable the test&lt;/li&gt;
	&lt;li&gt;Build and test with Dysprosium-SR17.  This is easy but risky since we may unintentionally rely on a feature only available in Dysprosium-SR17.&lt;/li&gt;
	&lt;li&gt;Compile with Californium-SR23 and test with Dysprosium-SR17.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="3626830" author="jeff.yemin" created="Mon, 22 Feb 2021 01:25:39 +0000"  >&lt;p&gt;The documentation of Mono#doOnTerminate seems to contradict my findings.  It claims that &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Runnable is executed first, then the onNext/onComplete/onError signal is propagated downstream.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="3626822" author="jeff.yemin" created="Mon, 22 Feb 2021 01:08:15 +0000"  >&lt;p&gt;The test is trying to prove that the second operation in a sequence of two operations uses the same server session as was created by the first operation. For a synchronous client, this works fine, but in the reactive streams driver it sometimes fails. The root cause of this appears to be quite straightforward. The sequence of events is as follows:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Test worker thread initiates insertOne, checks out a ServerSession, and blocks on the Mono in SyncMongoCollection, which is awaiting on a CountDownLatch&lt;/li&gt;
	&lt;li&gt;I/O thread receives results of insert command. Calls onNext method of the Mono. The onNext method counts down the latch on the blocking subscriber in SyncMongoCollection&lt;/li&gt;
	&lt;li&gt;TestWorker await on the latch wakes up, executes the find operation, and checks out another ServerSession&#160;&lt;/li&gt;
	&lt;li&gt;I/O thread calls Mono#doOnTerminate, which checks in the ServerSession from the first operation, but it&apos;s too late: a second server session was already checked out in the previous step.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I think we could make this pass consistently by releasing the ClientSession prior to executing onNext, instead of using Mono#doOnTerminate.  But I&apos;m not sure it&apos;s worth it, and we might just want to skip the test.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1636397">JAVA-4027</issuekey>
        </issuelink>
                            </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>JAVA-3971</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3nq7:</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>