<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:04:01 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-65926] Display string truncation not respecting UTF-8 character boundaries</title>
                <link>https://jira.mongodb.org/browse/SERVER-65926</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In our logs long strings are being truncated to 150 bytes irrespective of UTF-8 character boundaries. While this is not an issue for ASCII characters any multi-byte character that is on the truncation boundary gets cut at exactly 150 bytes and produces an invalid UTF-8 byte sequence contaminating our log file with an improper encoding.&lt;/p&gt;

&lt;p&gt;For example &apos;&#12354;&apos; is &quot;\xE3\x81\x82&quot; in UTF-8 bytes but if the last byte is cut it produces the invalid UTF-8 byte sequence of &quot;\xE3\x81&quot;.&lt;/p&gt;

&lt;p&gt;The code causing this issue &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/bson/bsonelement.cpp#L853-L862&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;can be found here&lt;/a&gt;. It should be updated to be aware of character boundaries in its trimming logic.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2032478">SERVER-65926</key>
            <summary>Display string truncation not respecting UTF-8 character boundaries</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="13203">Gone away</resolution>
                                        <assignee username="chris.kelly@mongodb.com">Chris Kelly</assignee>
                                    <reporter username="jcasali@atlassian.com">Justin Casali</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Apr 2022 17:25:28 +0000</created>
                <updated>Fri, 27 Oct 2023 20:45:29 +0000</updated>
                            <resolved>Wed, 18 May 2022 18:56:29 +0000</resolved>
                                    <version>5.3.1</version>
                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4557468" author="JIRAUSER1265262" created="Wed, 18 May 2022 18:55:38 +0000"  >&lt;p&gt;Hi Justin,&lt;/p&gt;

&lt;p&gt;Thanks for the clarification! This will help for future reference.&lt;br/&gt;
I&apos;ll go ahead and close this ticket for now.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Christopher&lt;/p&gt;</comment>
                            <comment id="4554532" author="JIRAUSER1268508" created="Tue, 17 May 2022 20:20:25 +0000"  >&lt;p&gt;Hi Christopher,&lt;/p&gt;

&lt;p&gt;Apologies for the late response, was out all last week.&lt;/p&gt;

&lt;p&gt;Looking back the truncation errors we were having are in version 4.2 which is before the new json structured logging was added in 4.4. The underlying code that was causing the issue is still present in the latest version although it looks like from your tests the truncation logic has switched to not displaying strings at all instead of partial chopped ones.&#160;&lt;/p&gt;

&lt;p&gt;Given that this issue does not appear in newer versions and we managed to implement a fix on our end in 4.2 I think we can close this bug report.&lt;/p&gt;

&lt;p&gt;Appreciate the help,&lt;br/&gt;
Justin&lt;/p&gt;</comment>
                            <comment id="4554181" author="JIRAUSER1265262" created="Tue, 17 May 2022 18:50:02 +0000"  >&lt;p&gt;Hi Justin,&lt;/p&gt;

&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, would you please send your mongod logs to the link provided above?&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Christopher&lt;/p&gt;</comment>
                            <comment id="4532158" author="JIRAUSER1265262" created="Fri, 6 May 2022 18:34:01 +0000"  >&lt;p&gt;Hi Justin,&lt;/p&gt;

&lt;p&gt;I went ahead and tried reproducing your problem on a single mongod running 5.3.1 and did not observe this behavior with the reproduction you refer to in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11873&quot; title=&quot;Truncating Log Lines breaks UTF-8 characters&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-11873&quot;&gt;&lt;del&gt;SERVER-11873&lt;/del&gt;&lt;/a&gt;. On 5.3.1, the output looks like the following:&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;{&quot;t&quot;:\{&quot;$date&quot;:&quot;2022-05-06T13:13:14.794-04:00&quot;},&quot;s&quot;:&quot;I&quot;, &#160;&quot;c&quot;:&quot;WRITE&quot;, &#160; &#160;&quot;id&quot;:51803, &#160; &quot;ctx&quot;:&quot;conn7&quot;,&quot;msg&quot;:&quot;Slow query&quot;,&quot;attr&quot;:\{&quot;type&quot;:&quot;update&quot;,&quot;ns&quot;:&quot;test.test&quot;,&quot;appName&quot;:&quot;MongoDB Shell&quot;,&quot;command&quot;:{&quot;q&quot;:{},&quot;u&quot;:\{&quot;$set&quot;:{&quot;description&quot;:&quot;Anupam Roy is a Bengali lyricist, composer, singer from Kolkata, West Bengal, India. He is best known for his song Amake amar moto thakte dao (&#2438;&#2478;&#2494;&#2453;&#2503; &#2438;&#2478;&#2494;&#2480; &#2478;&#2468; &#2469;&#2494;&#2453;&#2468;&#2503; &#2470;&#2494;&#2451;), which appeared on the soundtrack to the 2010 film Autograph&quot;}}&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 issue does, however, show itself on version 2.4.8 which that ticket refers to.&lt;/p&gt;

&lt;p&gt;I also tried &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.maxLogSizeKB&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;decreasing the maxLogSizeKB&lt;/a&gt; to 1 and was able to keep adding characters to the string with no truncation observed, up until that limit where it would no longer display the string whatsoever.&lt;/p&gt;

&lt;p&gt;In order to look into this further, it&apos;d be helpful to see your mongod log and the $dbpath/diagnostic.data directory (&lt;a href=&quot;https://docs.mongodb.com/manual/administration/analyzing-mongodb-performance/#full-time-diagnostic-data-capture&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the contents are described here&lt;/a&gt;). I&apos;ve created a secure &lt;a href=&quot;https://amphora.corp.mongodb.com/public/upload/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmb2xkZXJfaWQiOiIxNjI0MzUzNDIwNTUiLCJleHAiOjE2NTQ0NTE4NTF9.zPCGoG81wzMqs8ZHxFdjD6iQB1FdPYHaHtbNkyAMBnc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upload portal&lt;/a&gt; for you to upload an example covering the time you see this. Files uploaded to this portal are hosted on Box, are visible only to MongoDB employees, and are routinely deleted after some time.&lt;/p&gt;

&lt;p&gt;Additionally, if there is any other specific information you can provide on reproducing your specific problem in the logs, or something I may have omitted, that would be helpful before we pass it on.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Christopher&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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 6 May 2022 18:34:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 38 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, 38 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>jcasali@atlassian.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0sg93:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0befc:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11873&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;SERVER-11873&lt;/a&gt;&lt;/p&gt;</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>
                                    <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|i0s2ef:</customfieldvalue>

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