<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:33:26 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>[GODRIVER-52] Implement Drivers Sessions API</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-52</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description></description>
                <environment></environment>
        <key id="411196">GODRIVER-52</key>
            <summary>Implement Drivers Sessions API</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="rathi.gnanasekaran">Rathi Gnanasekaran</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Aug 2017 18:30:09 +0000</created>
                <updated>Sat, 28 Oct 2023 11:40:02 +0000</updated>
                            <resolved>Tue, 24 Jul 2018 21:28:14 +0000</resolved>
                                                    <fixVersion>0.0.10</fixVersion>
                                    <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1955692" author="xgen-internal-githook" created="Tue, 24 Jul 2018 21:42:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rfblue2&apos;, &apos;name&apos;: &apos;Roland Fong&apos;, &apos;email&apos;: &apos;rfblue2@gmail.com&apos;}
&lt;p&gt;Message: Remove Drop option from collectionopt&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-52&quot; title=&quot;Implement Drivers Sessions API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-52&quot;&gt;&lt;del&gt;GODRIVER-52&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: If6b6f70c2e40742ff7fa185f91e254e2d71f1517&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/eecffe0eec1ec89b01fcb17f288d59dfde0ab9e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/eecffe0eec1ec89b01fcb17f288d59dfde0ab9e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1955669" author="xgen-internal-githook" created="Tue, 24 Jul 2018 21:11:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roland Fong&apos;, &apos;email&apos;: &apos;rfblue2@gmail.com&apos;, &apos;username&apos;: &apos;rfblue2&apos;}
&lt;p&gt;Message: Sessions test plan.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-52&quot; title=&quot;Implement Drivers Sessions API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-52&quot;&gt;&lt;del&gt;GODRIVER-52&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: I6a8bd4ffa33d478bf6df2974e963a6339622f3c0&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/aa6b7a8459262327a39d8862903910164b5bf43f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/aa6b7a8459262327a39d8862903910164b5bf43f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1955668" author="xgen-internal-githook" created="Tue, 24 Jul 2018 21:11:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roland Fong&apos;, &apos;email&apos;: &apos;rfblue2@gmail.com&apos;, &apos;username&apos;: &apos;rfblue2&apos;}
&lt;p&gt;Message: Add Session Client Methods&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-52&quot; title=&quot;Implement Drivers Sessions API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-52&quot;&gt;&lt;del&gt;GODRIVER-52&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: I4db2bbee2cb5105482c0a5d2182bd909af51c857&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/e18bcf0a07ef7b845320f49126c97e8fede5e7a9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/e18bcf0a07ef7b845320f49126c97e8fede5e7a9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1955667" author="xgen-internal-githook" created="Tue, 24 Jul 2018 21:11:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roland Fong&apos;, &apos;email&apos;: &apos;rfblue2@gmail.com&apos;, &apos;username&apos;: &apos;rfblue2&apos;}
&lt;p&gt;Message: Add Mongo Session passable as an option&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-52&quot; title=&quot;Implement Drivers Sessions API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-52&quot;&gt;&lt;del&gt;GODRIVER-52&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: I7e93694aea2d8407036b24e019f01ae59ef2e716&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/bf02b960a7cc35f6a07da8ddfab978eb0eaaed6e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/bf02b960a7cc35f6a07da8ddfab978eb0eaaed6e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1955666" author="xgen-internal-githook" created="Tue, 24 Jul 2018 21:11:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Divjot Arora&apos;, &apos;email&apos;: &apos;divjot.arora@10gen.com&apos;, &apos;username&apos;: &apos;divjotarora&apos;}
&lt;p&gt;Message: Implement sessions in core&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-52&quot; title=&quot;Implement Drivers Sessions API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-52&quot;&gt;&lt;del&gt;GODRIVER-52&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: Ib3d60f531955a866f9b2c3fb58c5d12caff5681f&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/3d8db415387ae8e8035c706eb1217ed3743f2980&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/3d8db415387ae8e8035c706eb1217ed3743f2980&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1829009" author="david.golden" created="Fri, 9 Mar 2018 17:21:39 +0000"  >&lt;p&gt;Waiting on &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-254&quot; title=&quot;Redesign the private package &quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-254&quot;&gt;&lt;del&gt;GODRIVER-254&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780230" author="david.golden" created="Sun, 21 Jan 2018 20:46:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eliot&quot; class=&quot;user-hover&quot; rel=&quot;eliot&quot;&gt;eliot&lt;/a&gt; suggests giving users session objects that satisfy the &lt;a href=&quot;https://golang.org/pkg/context/#Context&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;context.Context&lt;/a&gt; interface.  That would allow users to pass them as the first argument to functions that take context as the first argument, which conveniently is what the Driver Sessions spec wants as well.&lt;/p&gt;

&lt;p&gt;I have some additional thoughts to consider before we implement.&lt;/p&gt;

&lt;p&gt; We have to think about composability of contexts.  If a user has an existing context, we may want &lt;tt&gt;client.StartSession&lt;/tt&gt; to have a &lt;tt&gt;WithContext(ctx)&lt;/tt&gt; option to wrap an existing context instead of defaulting to &lt;tt&gt;context.Background()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Likewise, if a client has a session object satisfying context.Context and then wants to wrap it in some other context afterwards (e.g. a timeout), we need to let them do that in a way that doesn&apos;t prevent them from calling Session API methods.  E.g. a user calling &lt;tt&gt;context.WithTimeout(session, time.Duration(2)*time.Second)&lt;/tt&gt; winds up with a type that no longer allows calling session API methods.&lt;/p&gt;

&lt;p&gt;We could store a session as a context &lt;b&gt;value&lt;/b&gt; (using &lt;tt&gt;context.WithValue()&lt;/tt&gt;) and require users to explicitly extract it to call methods.  This composes cleanly with other contexts, but is less elegant to read and may have some performance overhead to retrieve session values.  Providing some sugar functions in a &lt;tt&gt;session&lt;/tt&gt; package would make it much nicer to read/use.  E.g.&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;ctx.Value(mongo.SessionContextKey).EndSession() // long-hand&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;&amp;nbsp;&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;session.End(ctx) // sugar that does the above&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;That requires a sugar function taking a context object in the &lt;tt&gt;session&lt;/tt&gt; package for every &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#clientsession&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;ClientSession&lt;/tt&gt; API method&lt;/a&gt; described in the Drivers Sessions Spec.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="500394">GODRIVER-254</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="558060">GODRIVER-463</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="405741">DRIVERS-395</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="411197">GODRIVER-53</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="411301">GODRIVER-56</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="500703">GODRIVER-255</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="497247">GODRIVER-233</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="566881">GODRIVER-482</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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>GODRIVER-45</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8m4n:</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>