<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:53 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>[CSHARP-4645] WatchAsync() signatures are not consistent</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4645</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The signature for a MongoCollection.WatchAsync allows a pipeline argument as PipelineDefinition&amp;lt;ChangeStreamDocument&amp;lt;TDocument&amp;gt;, TResult&amp;gt;&lt;/p&gt;

&lt;p&gt;The signatures for MongoDatabase and MongoClient allows only PipelineDefinition&amp;lt;ChangeStreamDocument&amp;lt;BsonDocument&amp;gt;, TResult&amp;gt;&lt;/p&gt;

&lt;p&gt;Any particular reason why only Collection accepts a strongly typed pipeline?&lt;/p&gt;</description>
                <environment></environment>
        <key id="2334496">CSHARP-4645</key>
            <summary>WatchAsync() signatures are not consistent</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="3">Duplicate</resolution>
                                        <assignee username="boris.dogadov@mongodb.com">Boris Dogadov</assignee>
                                    <reporter username="magne@ryholt.no">Magne Ryholt</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 May 2023 07:40:27 +0000</created>
                <updated>Mon, 8 May 2023 21:58:20 +0000</updated>
                            <resolved>Mon, 8 May 2023 21:58:20 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5409926" author="JIRAUSER1257742" created="Mon, 8 May 2023 21:58:04 +0000"  >&lt;p&gt;Thanks for reporting this. Closing this ticket, and will track this issue in &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4646&quot; title=&quot;Support namespace queries in ChangeStreamDocument pipelines&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4646&quot;&gt;&lt;del&gt;CSHARP-4646&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="5409836" author="JIRAUSER1273681" created="Mon, 8 May 2023 21:20:06 +0000"  >&lt;p&gt;Thanks a lot, really helpful.&lt;br/&gt;
Can I close the issue myself? &lt;/p&gt;</comment>
                            <comment id="5409629" author="JIRAUSER1257742" created="Mon, 8 May 2023 20:12:53 +0000"  >&lt;p&gt;Thanks for the additional information.&lt;/p&gt;

&lt;p&gt;Yes, the driver does not support rendering namespace queries, we&apos;ll be tracking this feature in &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4646&quot; title=&quot;Support namespace queries in ChangeStreamDocument pipelines&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4646&quot;&gt;&lt;del&gt;CSHARP-4646&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And you are correct, the workaround for now would be specifying the pipeline via json.&lt;/p&gt;</comment>
                            <comment id="5409226" author="JIRAUSER1273681" created="Mon, 8 May 2023 18:19:56 +0000"  >&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;I kind of understand and kind of not&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;the streamed document is of the type defined by the pipeline, which is T for a Collection and just has to be BsonDocument for Database and Client.&lt;/p&gt;

&lt;p&gt;The BsonDocument from a e.g. Client stream may be deserialized to T anyway.&lt;/p&gt;

&lt;p&gt;I can solve my &quot;problem&quot; by specifying the pipeline match stage with raw Bson operations, but strongly typing is always safer and more readable.&lt;/p&gt;

&lt;p&gt;The reason why I ask is for keeping number of connections down because I want to be informed of many of the databases (hundreds), but not all and the pipeline cannot match on e.g. &amp;lt;changeDocument&amp;gt;.DatabaseNamespace.DatabaseName == &amp;lt;some name&amp;gt; because it throws when WatchAsync is called stating that there is no serializer registered for DatabaseNamespace, which, as described above, may be solved by raw Bson (please correct me if I am wrong)&lt;/p&gt;

&lt;p&gt;I could subscribe for changes from all databases and do the filtering client-side after deserializing to T, but I assume that creates much more network use (and possibly higher load server-side)&lt;/p&gt;</comment>
                            <comment id="5408831" author="JIRAUSER1257742" created="Mon, 8 May 2023 16:28:35 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=magne%40ryholt.no&quot; class=&quot;user-hover&quot; rel=&quot;magne@ryholt.no&quot;&gt;magne@ryholt.no&lt;/a&gt;, thanks for the question.&lt;/p&gt;

&lt;p&gt;MongoDatabase.Watch watches all collections across the database and MongoClient.Watch watches all collections across all databases.&lt;br/&gt;
Each collection could have a different type, therefore BsonDocument is the most basic type that can be used for such operation.&lt;/p&gt;</comment>
                            <comment id="5407289" author="JIRAUSER1263145" created="Mon, 8 May 2023 07:40:30 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=magne%40ryholt.no&quot; class=&quot;user-hover&quot; rel=&quot;magne@ryholt.no&quot;&gt;magne@ryholt.no&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2335137">CSHARP-4646</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_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1qe4w:</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>