<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:49:46 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-82604] Add missing std::string_view members to StringData</title>
                <link>https://jira.mongodb.org/browse/SERVER-82604</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="2486129">SERVER-82604</key>
            <summary>Add missing std::string_view members to StringData</summary>
                <type id="5" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14716&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="474744">SERVER-32422</parent>
                                    <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="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Oct 2023 00:41:56 +0000</created>
                <updated>Thu, 4 Jan 2024 17:12:08 +0000</updated>
                            <resolved>Wed, 15 Nov 2023 02:39:08 +0000</resolved>
                                                    <fixVersion>7.3.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5882873" author="billy.donahue" created="Wed, 15 Nov 2023 18:56:53 +0000"  >&lt;p&gt;[Announcement to #server copied here for durability...]&lt;/p&gt;


&lt;p&gt;Howdy Serverinos!&lt;/p&gt;

&lt;p&gt;Quick announcement about the ubiquitous mongo::StringData class.&lt;br/&gt;
(&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/base/string_data.h#L75&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/base/string_data.h#L75&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82604&quot; title=&quot;Add missing std::string_view members to StringData&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82604&quot;&gt;&lt;del&gt;SERVER-82604&lt;/del&gt;&lt;/a&gt; makes some changes to the StringData API, mostly good, and a few that could be frustrating. The idea is that StringData is eventually going to become std::string_view, which has performance, correctness, and maintenance benefits for us.&lt;/p&gt;

&lt;p&gt;We&apos;ve taken the step of giving it a single std::string_view data member and forwarding all member functions to that data member. You might think of it as simulating private inheritance. Mostly everything string_view could do (at least the large subset supported by all platforms) can now be done with StringData. That includes:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Added &lt;tt&gt;.data()&lt;/tt&gt; (to be preferred over &lt;tt&gt;.rawData()&lt;/tt&gt;).&lt;/li&gt;
	&lt;li&gt;Conversion (explicit) to &lt;tt&gt;std::string&lt;/tt&gt; (to be preferred over &lt;tt&gt;.toString()&lt;/tt&gt;).&lt;/li&gt;
	&lt;li&gt;Conversion (explicit) to &lt;tt&gt;std::string_view&lt;/tt&gt; (for APIs that need &lt;tt&gt;std::string_view&lt;/tt&gt;).&lt;/li&gt;
	&lt;li&gt;Added &lt;tt&gt;npos&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;begin/end are now extended with cbegin/cend, rbegin/rend, crbegin/crend .&lt;/li&gt;
	&lt;li&gt;back, front, at&lt;/li&gt;
	&lt;li&gt;Added ~20 new overloads of find/rfind/find_first_of/find_last_of.&lt;/li&gt;
	&lt;li&gt;Added remove_prefix, remove_suffix.&lt;/li&gt;
	&lt;li&gt;Added member swap.&lt;/li&gt;
	&lt;li&gt;All typedefs, including size_type.&lt;/li&gt;
	&lt;li&gt;Debug-mode instrumented iterators on Windows (already caught some bugs!).&lt;/li&gt;
	&lt;li&gt;Added constexpr and noexcept attributes.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;StringData::StringData(std::nullptr_t) = delete;&lt;/tt&gt; (per std::string_view).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Caveats:&lt;br/&gt;
Iterator is an unspecified type, and not necessarily &lt;tt&gt;const char*&lt;/tt&gt;. Yes, this makes some existing usage more annoying, but has safety advantages. You can&apos;t directly use a StringData iterator in an expression that takes a const char* anymore. We also cannot &quot;cheat&quot; and peek beyond a StringData&apos;s range. Use .data() to work around this.&lt;br/&gt;
The &lt;tt&gt;const char*, const char*&lt;/tt&gt; range constructor is removed&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;. Ranges must be specified as &lt;tt&gt;const char*, size_t&lt;/tt&gt; constructor arguments.&lt;/p&gt;

&lt;p&gt;All uses of StringData in the codebase have been adapted to deal with the API change. But hopefully this announcement will reduce surprise.&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; This is unfortunate, but it&apos;s a C++20 feature and the string_view in XCode13.2.1 doesn&apos;t have it, and we don&apos;t want complete conversion to std::string_view to be blocked on an XCode upgrade. It wasn&apos;t hard to work around this in practice. This is also why it doesn&apos;t have a &lt;tt&gt;contains&lt;/tt&gt; member.&lt;/p&gt;</comment>
                            <comment id="5880625" author="xgen-internal-githook" created="Tue, 14 Nov 2023 23:12:17 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-82604&quot; title=&quot;Add missing std::string_view members to StringData&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-82604&quot;&gt;&lt;del&gt;SERVER-82604&lt;/del&gt;&lt;/a&gt; implement StringData with a std::string_view member&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5b9380b8be11fcb1cfb4eba3a13331312d30b4da&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5b9380b8be11fcb1cfb4eba3a13331312d30b4da&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="2537241">SERVER-84563</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>2.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>Mon, 13 Nov 2023 17:37:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 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>kaloian.manassiev@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2y2lz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2fxbo:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></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|i2xorb:</customfieldvalue>

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