<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:47: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>[SERVER-37927] Print readConcern and writeConcern for slow queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-37927</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-1668&quot; title=&quot;Expand transaction documentation for configuring write_concern and read_concern&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-1668&quot;&gt;PYTHON-1668&lt;/a&gt; I would have wanted to verify readConcern and writeConcern for queries logged to mongod.log. I couldn&apos;t see those, even if readPreference is logged. I also am not aware of another way to log readConcern or writeConcern, but admittedly didn&apos;t try the debug log levels.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if we can add more info to slow query logging, bur readConcern and writeConcern seem like a big deal, for example compared to readPreference.&lt;/p&gt;</description>
                <environment></environment>
        <key id="629304">SERVER-37927</key>
            <summary>Print readConcern and writeConcern for slow queries</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="henrik.ingo@mongodb.com">Henrik Ingo</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Nov 2018 19:34:59 +0000</created>
                <updated>Fri, 27 Oct 2023 13:53:26 +0000</updated>
                            <resolved>Wed, 7 Nov 2018 12:07:42 +0000</resolved>
                                    <version>4.0.3</version>
                                                    <component>Logging</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2054319" author="henrik.ingo@10gen.com" created="Wed, 7 Nov 2018 12:07:28 +0000"  >&lt;p&gt;Ok, I reran and looking closer. The readConcern is in the first operation of a transaction, right next to startTransaction:&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;   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;2018-11-07T07:46:45.411+0200 I COMMAND  [conn50] command test.hltest command: find { find: &quot;hltest&quot;, filter: { _id: 1 }, limit: 1, singleBatch: true, lsid: { id: UUID(&quot;a2d9e096-02a3-41ee-88f2-a8af76f5ee00&quot;) }, startTransaction: true, readConcern: { level: &quot;snapshot&quot; }, txnNumber: 100, autocommit: false, $clusterTime: { clusterTime: Timestamp(1541569605, 59), signature: { keyId: 0, hash: BinData(0, 0000000000000000000000000000000000000000) } }, $db: &quot;test&quot;, $readPreference: { mode: &quot;primaryPreferred&quot; } } planSummary: IDHACK keysExamined:1 docsExamined:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:249 locks:{} protocol:op_msg 0ms&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;...but doesn&apos;t re-appear in the additional reads nor writes.&lt;/p&gt;

&lt;p&gt;And the writeConcern is in the commitTransaction, but not in the individual writes, which makes sense, as the writeConcern applies to the commit (and this is when the driver sends it too).&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;   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;2018-11-07T07:46:45.419+0200 I COMMAND  [conn50] command admin.$cmd command: commitTransaction { commitTransaction: 1, txnNumber: 100, autocommit: false, writeConcern: { w: &quot;majority&quot; }, lsid: { id: UUID(&quot;a2d9e096-02a3-41ee-88f2-a8af76f5ee00&quot;) }, $clusterTime: { clusterTime: Timestamp(1541569605, 59), signature: { keyId: 0, hash: BinData(0, 0000000000000000000000000000000000000000) } }, $db: &quot;admin&quot;, $readPreference: { mode: &quot;primary&quot; } } numYields:0 reslen:163 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { w: 3 } }, Collection: { acquireCount: { w: 2 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_msg 4ms&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;The reason I didn&apos;t see them at first is that in Case 3 in &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-1668&quot; title=&quot;Expand transaction documentation for configuring write_concern and read_concern&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-1668&quot;&gt;PYTHON-1668&lt;/a&gt; the client doesn&apos;t send any read or write concern, server default is used and nothing is logged about that. (Essentially, what is logged is what the client sent.)&lt;/p&gt;

&lt;p&gt;I will close this ticket, but thanks for telling me where to look.&lt;/p&gt;</comment>
                            <comment id="2053893" author="henrik.ingo@10gen.com" created="Tue, 6 Nov 2018 21:55:24 +0000"  >&lt;p&gt;Unfortunately I seem to have neglected to keep the mongod.log and it&apos;s lost in the cloud now. But I did set slowms to -1 and did see my queries. I saw readPreference but no readConcern on queries. Maybe it was there for the transaction line?&lt;/p&gt;

&lt;p&gt;I guess for &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-1668&quot; title=&quot;Expand transaction documentation for configuring write_concern and read_concern&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-1668&quot;&gt;PYTHON-1668&lt;/a&gt; I&apos;m really more worried about write concern.&lt;/p&gt;

&lt;p&gt;I think I need to rerun test for &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-1668&quot; title=&quot;Expand transaction documentation for configuring write_concern and read_concern&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-1668&quot;&gt;PYTHON-1668&lt;/a&gt; with more verbose (or attention to...) logging. I will double check your statement as well. You can assign this to me while waiting, if that is correct process wise.&lt;/p&gt;</comment>
                            <comment id="2053212" author="bruce.lucas@10gen.com" created="Tue, 6 Nov 2018 16:05:51 +0000"  >&lt;p&gt;I believe we do log readConcern for the transaction, and since slow transaction logging follows the same slowms setting as the individual operations, if those were logged the transaction should have been logged. Would that have been sufficient for &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-1668&quot; title=&quot;Expand transaction documentation for configuring write_concern and read_concern&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-1668&quot;&gt;PYTHON-1668&lt;/a&gt;?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="629285">PYTHON-1668</issuekey>
        </issuelink>
                            </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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 6 Nov 2018 16:05:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 14 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>
                            5 years, 14 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>henrik.ingo@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huc407:</customfieldvalue>

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

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

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