<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:42:10 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>[SERVER-57558] listCollections with {nameOnly: true, authorizedCollections: true} does not return timeseries collections</title>
                <link>https://jira.mongodb.org/browse/SERVER-57558</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As a result of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56933&quot; title=&quot;listCollections output should allow user to recreate time-series collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56933&quot;&gt;&lt;del&gt;SERVER-56933&lt;/del&gt;&lt;/a&gt;, when a user has privileges on timeseries example_db.example_coll, and the user runs &lt;tt&gt;listCollections: 1, nameOnly: true, authorizedCollections: true&lt;/tt&gt;, the listCollections command does not return the time series collection in the results.&lt;/p&gt;

&lt;p&gt;This is the result of an early exit in a lambda function &lt;a href=&quot;https://github.com/mongodb/mongo/commit/8d5547cdd6c45dd68c95dcf353e459e62da5222b#diff-884d5a73c3e846f620539b33948562728987e7f63fa5a0f6430a43152b924cf6R457-R473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here.&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1773877">SERVER-57558</key>
            <summary>listCollections with {nameOnly: true, authorizedCollections: true} does not return timeseries collections</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="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="mark.benvenuto@mongodb.com">Mark Benvenuto</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Jun 2021 03:14:38 +0000</created>
                <updated>Sun, 29 Oct 2023 21:52:26 +0000</updated>
                            <resolved>Thu, 17 Jun 2021 16:47:14 +0000</resolved>
                                    <version>5.0.0-rc0</version>
                                    <fixVersion>5.0.0-rc3</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4107328" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 18:23:35 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="3885928" author="xgen-internal-githook" created="Thu, 17 Jun 2021 20:54:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57558&quot; title=&quot;listCollections with {nameOnly: true, authorizedCollections: true} does not return timeseries collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57558&quot;&gt;&lt;del&gt;SERVER-57558&lt;/del&gt;&lt;/a&gt; Include time-series collections in listCollections with authorizedCollections&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 870f8af7b3052d0e866f3b24c7220fef1f9d66f5)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/79815286e32e2fa88d0e08759cc9bfded8cad8fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/79815286e32e2fa88d0e08759cc9bfded8cad8fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3885214" author="xgen-internal-githook" created="Thu, 17 Jun 2021 16:34:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57558&quot; title=&quot;listCollections with {nameOnly: true, authorizedCollections: true} does not return timeseries collections&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57558&quot;&gt;&lt;del&gt;SERVER-57558&lt;/del&gt;&lt;/a&gt; Include time-series collections in listCollections with authorizedCollections&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/870f8af7b3052d0e866f3b24c7220fef1f9d66f5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/870f8af7b3052d0e866f3b24c7220fef1f9d66f5&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 17 Jun 2021 13:57:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>mark.benvenuto@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzklpz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2zrb:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4880">Execution Team 2021-06-28</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1. Start mongod with --auth&lt;br/&gt;
2. There are two scripts a setup.js that needs to be run only once. And a repro.js script that can be run many times.&lt;br/&gt;
//////////////&lt;br/&gt;
Setup.js&lt;br/&gt;
////////////////////&lt;br/&gt;
function createTestRoleAndUser(db, roleName, privs) {&lt;br/&gt;
    const admin = db.getSiblingDB(&quot;admin&quot;);&lt;br/&gt;
    assert.commandWorked(admin.runCommand(&lt;/p&gt;
{createRole: roleName, roles: [], privileges: privs}
&lt;p&gt;));&lt;/p&gt;

&lt;p&gt;    const userName = &quot;user|&quot; + roleName;&lt;br/&gt;
    assert.commandWorked(&lt;br/&gt;
        db.runCommand({createUser: userName, pwd: &quot;pwd&quot;, roles: [&lt;/p&gt;
{role: roleName, db: &quot;admin&quot;}
&lt;p&gt;]}));&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;const dbName = &quot;list_collections_own_collections&quot;;&lt;/p&gt;

&lt;p&gt;const admin = db.getSiblingDB(&quot;admin&quot;);&lt;br/&gt;
assert.commandWorked(admin.runCommand(&lt;/p&gt;
{createUser: &quot;root&quot;, pwd: &quot;root&quot;, roles: [&quot;root&quot;]}
&lt;p&gt;));&lt;br/&gt;
assert(admin.auth(&quot;root&quot;, &quot;root&quot;));&lt;/p&gt;

&lt;p&gt;const db2 = db.getSiblingDB(dbName);&lt;/p&gt;

&lt;p&gt;createTestRoleAndUser(db2, &quot;roleWithExactNamespacePrivilegesBuckets&quot;, [&lt;br/&gt;
    {resource: &lt;/p&gt;
{db: dbName, collection: &quot;foo&quot;}
&lt;p&gt;, actions: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;find&amp;quot;&amp;#93;&lt;/span&gt;},&lt;br/&gt;
]);&lt;/p&gt;


&lt;p&gt;// Create the collection and view used by the tests.&lt;br/&gt;
assert.commandWorked(db2.dropDatabase());&lt;br/&gt;
assert.commandWorked(db2.createCollection(&quot;foo&quot;, {timeseries: {timeField: &quot;date&quot;}}));&lt;br/&gt;
///////////////////&lt;br/&gt;
Repro.js&lt;br/&gt;
//////////////&lt;/p&gt;

&lt;p&gt;const userName = &quot;user|roleWithExactNamespacePrivilegesBuckets&quot;;&lt;br/&gt;
const dbName = &quot;list_collections_own_collections&quot;;&lt;/p&gt;

&lt;p&gt;const db2 = db.getSiblingDB(dbName);&lt;/p&gt;

&lt;p&gt;const admin = db.getSiblingDB(&quot;admin&quot;);&lt;/p&gt;

&lt;p&gt;assert(db2.auth(userName, &quot;pwd&quot;));&lt;/p&gt;

&lt;p&gt;let res = db2.runCommand(&lt;/p&gt;
{listCollections: 1, nameOnly: true, authorizedCollections: true}
&lt;p&gt;);&lt;br/&gt;
assert.commandWorked(res);&lt;br/&gt;
print(tojson(res));&lt;br/&gt;
// Bug is that res is empty, it should have the foo collection.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzk7z3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>