<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:32:39 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-76420] SBE: improve stage debugPrint() output</title>
                <link>https://jira.mongodb.org/browse/SERVER-76420</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Current SBE debugPrint() output, which is also shown by explain(), is not interpretable without the source code. Example sbe::ScanStage::debugPrint() output:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; scan s1 none none none none none [] @&quot;&amp;lt;collUUID&amp;gt;&quot; true false&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&quot;s1 none none none none none&quot; is info about which slots actually exist out of all slots that &lt;b&gt;might&lt;/b&gt; exist for this stage.&lt;/li&gt;
	&lt;li&gt;&quot;true false&quot; is info about the scan direction and whether the oplogTs slot exists (unknown why this is not treated the same as other slots).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;In #1 the reader needs the source code to discover that after the &quot;scan&quot; keyword the next bunch of fields are telling either the SlotId of a slot that exists for some specific value, or &quot;none&quot; meaning the slot in that position does not exist. The position of a given slot is not consistent though as the first slot that might be printed, for the seek record ID, does not get &quot;none&quot; printed if it does not exist, so the positions of a later slot might be either N or N+1. E.g. the record slot might be either position 1 or 2, the recordId slot might be position 2 or 3, etc., and without the source code the reader does not have any information about which slot is in any position.&lt;/p&gt;

&lt;p&gt;In #2 the reader needs to know that the &quot;true&quot; means this is a forward scan and the &quot;false&quot; means the oplogTs slot does not exist.&lt;/p&gt;

&lt;p&gt;This ticket is to improve the debug output of all SBE stages that use this paradigm for identifying slots. A more readable output could be something like the following, reporting the same information as in the above example but in more easily understood form:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;b&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; scan rec&lt;span class=&quot;error&quot;&gt;&amp;#91;s1&amp;#93;&lt;/span&gt; [] @&quot;&amp;lt;collUUID&amp;gt;&quot; forward&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The approach here is based on the ideas of:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Do not print anything about slots that do not exist. Non-existent slots do not play a part in the stage&apos;s operation, so listing them just reduces the signal-to-noise ratio.&lt;/li&gt;
	&lt;li&gt;For each slot that does exist, print them as &quot;mnemonic&lt;span class=&quot;error&quot;&gt;&amp;#91;SlotId&amp;#93;&lt;/span&gt;&quot; or similar compact syntax, e.g. above &quot;rec&lt;span class=&quot;error&quot;&gt;&amp;#91;s1&amp;#93;&lt;/span&gt;&quot; means the record slot exists and is slot s1. Suggested mnemonics:
	&lt;ol&gt;
		&lt;li&gt;seek - seekRecordId slot&lt;/li&gt;
		&lt;li&gt;min - minRecordId slot&lt;/li&gt;
		&lt;li&gt;max - maxRecordId slot&lt;/li&gt;
		&lt;li&gt;rec - record slot&lt;/li&gt;
		&lt;li&gt;recId - recordId slot&lt;/li&gt;
		&lt;li&gt;snapId - snapshotId slot&lt;/li&gt;
		&lt;li&gt;idxId - indexId slot&lt;/li&gt;
		&lt;li&gt;idxKey - indexKey slot&lt;/li&gt;
		&lt;li&gt;idxKeyPat - indexKeyPattern slot&lt;/li&gt;
		&lt;li&gt;oplogTs - oplogTs slot (treat this slot same as the others instead of having a different, custom treatment)&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;Print meaningful keywords instead of &quot;true&quot; or &quot;false&quot; for other info. Suggested keywords:
	&lt;ol&gt;
		&lt;li&gt;forward, reverse - scan direction&lt;/li&gt;
		&lt;li&gt;random - print if random cursor is used&lt;/li&gt;
		&lt;li&gt;lowPriority - print if it is a low priority scan&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The only stage debugPrint() methods that currently print &quot;none&quot; (DebugPrinter::kNoneKeyword) are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;ColumnStageScan::debugPrint() - column_scan.cpp&lt;/li&gt;
	&lt;li&gt;&#160;IndexScanStageBase::debugPrintImpl() - ix_scan.cpp&lt;/li&gt;
	&lt;li&gt;SimpleIndexScanStage::debugPrint() - ix_scan.cpp&lt;/li&gt;
	&lt;li&gt;ScanStage::debugPrint() - scan.cpp&lt;/li&gt;
	&lt;li&gt;ParallelScanStage::debugPrint() - scan.cpp&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;so these are the primary debug printers needing to be addressed. The other debug printers need to be checked for outputting unlabeled true/false values.&lt;/p&gt;

&lt;p&gt;There is already an implementation of these changes for ScanStage::debugPrint() in commit #40 of PR 10981 for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74521&quot; title=&quot;Support clustered collections in SBE without caching their plans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74521&quot;&gt;&lt;del&gt;SERVER-74521&lt;/del&gt;&lt;/a&gt; at this direct link:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/mongo/pull/10981/commits/832fbc767fa9c81fd1c9004636b3f59090bf8438&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/pull/10981/commits/832fbc767fa9c81fd1c9004636b3f59090bf8438&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However it was removed from this PR in commit #47 due to a desire to keep output consistent across stages, whereas the original PR is for a ticket that is only updating ScanStage.&lt;/p&gt;

&lt;p&gt;This will be a very quick project with big payoffs in developer productivity and could be triaged as a New Engineer ticket.&lt;/p&gt;

&lt;p&gt;Also, customers can see this &quot;debug&quot; output via explain() and without the source code, there is no way for them to understand the current output. This ticket will help improve the customer experience and potentially reduce Support tickets.&lt;/p&gt;

&lt;p&gt;FYI &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kyle.suarez%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;kyle.suarez@mongodb.com&quot;&gt;kyle.suarez@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=martin.neupauer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;martin.neupauer@mongodb.com&quot;&gt;martin.neupauer@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;david.storch@mongodb.com&quot;&gt;david.storch@mongodb.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=amr.elhelw%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;amr.elhelw@mongodb.com&quot;&gt;amr.elhelw@mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2321077">SERVER-76420</key>
            <summary>SBE: improve stage debugPrint() output</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="kevin.cherkauer@mongodb.com">Kevin Cherkauer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Apr 2023 16:19:17 +0000</created>
                <updated>Tue, 9 May 2023 16:16:35 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                        <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 21 Apr 2023 17:25:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        41 weeks, 5 days 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>amr.elhelw@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            41 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>kevin.cherkauer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i25t1b:</customfieldvalue>

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

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