<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:05:30 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-66460] changeStream does not support index</title>
                <link>https://jira.mongodb.org/browse/SERVER-66460</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="2046422">SERVER-66460</key>
            <summary>changeStream does not support index</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="13202">Works as Designed</resolution>
                                        <assignee username="chris.kelly@mongodb.com">Chris Kelly</assignee>
                                    <reporter username="pickup112@gmail.com">pickup li</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 May 2022 09:43:19 +0000</created>
                <updated>Fri, 27 Oct 2023 13:52:02 +0000</updated>
                            <resolved>Wed, 15 Jun 2022 15:32:57 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4619623" author="JIRAUSER1268612" created="Thu, 16 Jun 2022 03:16:02 +0000"  >&lt;p&gt;Thanks for repsonse.&lt;/p&gt;

&lt;p&gt;I will request on &#160;&lt;a href=&quot;https://feedback.mongodb.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;feedback.mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4618019" author="JIRAUSER1265262" created="Wed, 15 Jun 2022 15:32:05 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Thanks for your patience. I was able to confirm this behavior when testing, and found that there is specific reasoning for this not behaving as you are expecting. You will also see this behavior running &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/method/Mongo.watch/#example&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Mongo.watch() in mongosh&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;a href=&quot;https://www.mongodb.com/docs/manual/changeStreams/#watch-a-collection--database--or-deployment&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Change streams do not monitor events in admin, local, and config databases.&lt;/a&gt;&lt;/b&gt;&#160;MongoDB stores all role information in the admin. system.roles collection &lt;a href=&quot;https://www.mongodb.com/docs/manual/tutorial/manage-users-and-roles/#create-a-user-defined-role&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in the admin database.&lt;/a&gt; Additionally, views are inserted into a system collection even if you are using a test db.&lt;/p&gt;

&lt;p&gt;This looks like intended behavior at this time, but I can see how you would expect more capability with the change stream functionality. If you&apos;d like, you can share your request at &lt;a href=&quot;https://feedback.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;feedback.mongodb.com&lt;/a&gt; to get your concerns on the radar. We&apos;re starting to direct new feature requests and improvements to that channel and preferring this JIRA project for bug reports specifically.&lt;/p&gt;

&lt;p&gt;You may also want to search and post on the &lt;a href=&quot;https://community.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Developer Community Forums&lt;/a&gt;, as it&apos;s possible there are others who have guidance on how to satisfy your use-case in the interim.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Christopher&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                            <comment id="4574875" author="JIRAUSER1268612" created="Thu, 26 May 2022 13:26:14 +0000"  >
&lt;h1&gt;&lt;a name=&quot;mongodbreplicasetenvironment&quot;&gt;&lt;/a&gt;mongodb replica set environment&lt;/h1&gt;

&lt;p&gt;using docker-compose to start a mongodb replica set&#160;&lt;/p&gt;


&lt;p&gt;```&lt;br/&gt;
&amp;gt; git clone &lt;a href=&quot;https://github.com/yowko/docker-compose-mongodb-replica-set-with-auth.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/yowko/docker-compose-mongodb-replica-set-with-auth.git&lt;/a&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&amp;gt; cd docker-compose-mongodb-replica-set-with-auth&lt;/p&gt;



&lt;p&gt;#change image: mongo:4.2.8-bionic to image: mongo:latest&lt;/p&gt;

&lt;p&gt;&amp;gt; vim docker-compose.yaml&lt;br/&gt;
&#160;#&#160; image: mongo:latest&lt;br/&gt;
&#160;&lt;br/&gt;
&amp;gt; bash start.sh&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;golangtoget%C2%A0changeStream%C2%A0&quot;&gt;&lt;/a&gt;golang to get&#160; changeStream&#160;&lt;/h1&gt;
&lt;p&gt;```&lt;br/&gt;
&amp;gt; git clone &lt;a href=&quot;https://github.com/abhirockzz/mongodb-changestreams-processor&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/abhirockzz/mongodb-changestreams-processor&lt;/a&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
&amp;gt; cd mongodb-changestreams-processor-master&lt;br/&gt;
&#160;&lt;/p&gt;

&lt;p&gt;#listen to client&lt;/p&gt;

&lt;p&gt;#change pipe to {}; and comment out pipeline&#65292;&lt;/p&gt;


&lt;p&gt;&amp;gt; vi main.go&lt;/p&gt;

&lt;p&gt;#//&quot;go.mongodb.org/mongo-driver/bson&quot;&lt;/p&gt;

&lt;p&gt;#//matchStage := bson.D{{&quot;$match&quot;, bson.D{{&quot;operationType&quot;, bson.D{{&quot;$in&quot;, bson.A &lt;/p&gt;
{&quot;insert&quot;, &quot;update&quot;, &quot;replace&quot;}

&lt;p&gt;}}}}}}&lt;/p&gt;

&lt;p&gt;#//matchStage := bson.D{{&quot;$match&quot;, bson.D{{&quot;operationType&quot;, &quot;insert&quot;}}}}&lt;/p&gt;

&lt;p&gt;#//projectStage := bson.D{&lt;br/&gt;
Unknown macro: {&quot;$project&quot;, bson.M{&quot;_id&quot;: 1, &quot;fullDocument&quot;: 1, &quot;ns&quot;: 1, &quot;documentKey&quot;: 1}}&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;#//pipeline := mongo.Pipeline{matchStage, projectStage}&lt;/p&gt;

&lt;p&gt;#cs, err := coll.Watch(ctx, pipeline, opts) -&amp;gt; cs, err := client.Watch(ctx, mongo.Pipeline{}, opts)&lt;br/&gt;
&#160;&lt;/p&gt;

&lt;p&gt;#connect to mongodb replica set for changeStream&lt;br/&gt;
&amp;gt; MONGODB_URI=mongodb://root:pass.123@127.0.0.1:27037 MONGODB_DATABASE=test MONGODB_COLLECTION=students WITH_RESUME=true go run main.go&lt;br/&gt;
&#160;&lt;br/&gt;
```&lt;br/&gt;
&#160;&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;fillmongodbsomedata&quot;&gt;&lt;/a&gt;fill mongodb some data&lt;/h1&gt;

&lt;p&gt;fill data&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
rs0:PRIMARY&amp;gt; use test&lt;br/&gt;
rs0:PRIMARY&amp;gt; db.inventory.insertMany([ { item: &quot;journal&quot;, qty: 25, tags: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;blank&amp;quot;, &amp;quot;red&amp;quot;&amp;#93;&lt;/span&gt;, size: { h: 14, w: 21, uom: &quot;cm&quot; }&lt;/p&gt;

&lt;p&gt;},&lt;/p&gt;

&lt;p&gt;{ item: &quot;mat&quot;, qty: 85, tags: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;gray&amp;quot;&amp;#93;&lt;/span&gt;, size: &lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
{ h: 27.9, w: 35.5, uom: &quot;cm&quot; }

&lt;p&gt;},&lt;/p&gt;

&lt;p&gt;{ item: &quot;mousepad&quot;, qty: 25, tags: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;gel&amp;quot;, &amp;quot;blue&amp;quot;&amp;#93;&lt;/span&gt;, size: &lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
{ h: 19, w: 22.85, uom: &quot;cm&quot; }

&lt;p&gt;}&lt;br/&gt;
])&lt;br/&gt;
&#160;&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;getchangefromchangeStream&quot;&gt;&lt;/a&gt;get change from changeStream&lt;/h1&gt;
&lt;p&gt;```&lt;br/&gt;
&amp;gt; cat change_events&lt;br/&gt;
&quot;insert&quot;&lt;br/&gt;
&quot;insert&quot;&lt;br/&gt;
&quot;insert&quot;&lt;br/&gt;
&quot;insert&quot;&lt;br/&gt;
```&lt;br/&gt;
&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;h1&gt;&lt;a name=&quot;testview%E3%80%81index%E3%80%81user%E3%80%81rolewillnochangeevent&quot;&gt;&lt;/a&gt;test view&#12289;index&#12289;user&#12289;role will no change event&lt;/h1&gt;
&lt;ul&gt;
	&lt;li&gt;create Index with no change event&lt;br/&gt;
```&lt;br/&gt;
rs0:PRIMARY&amp;gt; use test&lt;br/&gt;
rs0:PRIMARY&amp;gt; db.inventory.createIndex( { qty: 1 } )&lt;br/&gt;
```&lt;br/&gt;
&#160;&lt;/li&gt;
	&lt;li&gt;create view with no change event&lt;br/&gt;
```&lt;br/&gt;
db.createView(&quot;v1&quot;,&quot;inventory&quot;,&lt;a href=&quot;file://{$project: {&amp;quot;high&amp;quot;:&amp;quot;$size.h&amp;quot;, &amp;quot;item&amp;quot;:1, &amp;quot;qty&amp;quot;:2}}&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;\\{$project: {&quot;high&quot;:&quot;$size.h&quot;, &quot;item&quot;:1, &quot;qty&quot;:2}}&lt;/a&gt;)&lt;br/&gt;
```&lt;br/&gt;
&#160;&lt;/li&gt;
	&lt;li&gt;create user with no change event&lt;br/&gt;
```&lt;br/&gt;
use test&lt;br/&gt;
db.createUser( { user: &quot;accountUser&quot;, pwd: &quot;pas$Word&quot;, roles: [ &quot;readWrite&quot;, &quot;dbAdmin&quot; ] }&lt;br/&gt;
)&lt;br/&gt;
```&lt;br/&gt;
&#160;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;create role with no change event&lt;br/&gt;
```&lt;br/&gt;
use admin&lt;br/&gt;
db.createRole(&lt;br/&gt;
Unknown macro: {role}&lt;br/&gt;
,
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { resource}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;,&lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { resource}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;,&lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { resource}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;],&lt;br/&gt;
roles: [&lt;/p&gt;
{ role: &quot;read&quot;, db: &quot;admin&quot; }
&lt;p&gt;]&lt;br/&gt;
},&lt;/p&gt;
{ w: &quot;majority&quot; , wtimeout: 5000 }
&lt;p&gt;)&lt;br/&gt;
```&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="4568374" author="JIRAUSER1265262" created="Tue, 24 May 2022 06:52:12 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;In order to look into this further, we&apos;re going to need some additional information. If possible, it would be helpful if you could supply the following:&lt;/p&gt;

&lt;p&gt;For each node in the replica set spanning a time period that includes the incident, would you please archive (tar or zip) and upload to the ticket:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the mongod/mongos logs covering when you attempt the commands you are running&lt;/li&gt;
	&lt;li&gt;the version of mongodb you are using&lt;/li&gt;
	&lt;li&gt;explain whether you are running a single node, replica set, or sharded cluster (remember that change streams on sharded clusters &lt;a href=&quot;https://www.mongodb.com/docs/manual/changeStreams/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;must be opened on mongos&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;explain in greater detail how you are opening your change stream&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Christopher&lt;/p&gt;</comment>
                            <comment id="4555152" author="JIRAUSER1268612" created="Wed, 18 May 2022 01:51:29 +0000"  >&lt;p&gt;I also noticed that user and role are also not supported on changeStream&lt;/p&gt;</comment>
                            <comment id="4547121" author="JIRAUSER1268612" created="Fri, 13 May 2022 09:55:16 +0000"  >&lt;p&gt;I tested the changeStream of mongodb. The changes of adding view and index to mongodb are not reflected in changeStream, but the corresponding log can be found in oplog&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 24 May 2022 06:52:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 34 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_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>
                            1 year, 34 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>chris.kelly@mongodb.com</customfieldvalue>
            <customfieldvalue>pickup112@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0utmv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0dqc8:</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_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>
                                    <customfieldvalue><![CDATA[edwin.zhou@mongodb.com]]></customfieldvalue>
        <customfieldvalue><![CDATA[chris.kelly@mongodb.com]]></customfieldvalue>
    

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

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