<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:38: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>[DOCS-524] Turn recommendation into example for padding with compact</title>
                <link>https://jira.mongodb.org/browse/DOCS-524</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual/reference/commands/#compact&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/commands/#compact&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where did the the section recommending 10% or 100 bytes of padding come from?  This is not something that should be recommended as a hard and fast rule, but the information should be preserved as an example showing how one &lt;b&gt;can&lt;/b&gt; use paddingFactor and paddingBytes options to compact.&lt;/p&gt;</description>
                <environment></environment>
        <key id="50542">DOCS-524</key>
            <summary>Turn recommendation into example for padding with compact</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="9">Done</resolution>
                                        <assignee username="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="dan@mongodb.com">Daniel Pasette</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Sep 2012 18:59:37 +0000</created>
                <updated>Mon, 30 Oct 2023 22:01:59 +0000</updated>
                            <resolved>Mon, 17 Sep 2012 15:24:13 +0000</resolved>
                                    <version>v1.0</version>
                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="165818" author="auto" created="Wed, 19 Sep 2012 01:03:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-18T17:46:02-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/ddeb0c9d348c72c7533074a2d429770d4194cd17&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/ddeb0c9d348c72c7533074a2d429770d4194cd17&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165817" author="auto" created="Wed, 19 Sep 2012 01:03:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-18T12:41:21-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt; compact method equation use option directives&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/6020e67032497c7cc7794d850b680fb7bc1d6ec2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/6020e67032497c7cc7794d850b680fb7bc1d6ec2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165816" author="auto" created="Wed, 19 Sep 2012 01:03:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-18T07:12:53-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt; explain paddingFactor equation&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/93decd9b11534c5f41d2f2e4d98bd066d1e65ba5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/93decd9b11534c5f41d2f2e4d98bd066d1e65ba5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165252" author="kay.kim@10gen.com" created="Mon, 17 Sep 2012 21:38:44 +0000"  >&lt;p&gt;Hey Dan &amp;#8211;&lt;/p&gt;

&lt;p&gt;I think I can kind of explain the padding equation:&lt;/p&gt;

&lt;p&gt; paddingFactor: 4.0 would only add 120 bytes (i.e. 40 * (4.0 - 1)) of&lt;br/&gt;
padding&lt;/p&gt;

&lt;p&gt;If we gloss over some of the other manipulations, the source code allocates&lt;br/&gt;
document space = (originalDocumentLength)  * PaddingFactor ;  which would&lt;br/&gt;
have been 40 * 4.0 = 160 bytes (in our example) of which 120 would be&lt;br/&gt;
padding.&lt;/p&gt;

&lt;p&gt;I&apos;m going to set up a meeting with either Mathias  to discuss some of these&lt;br/&gt;
other manipulations of the padding factor, including when you would set&lt;br/&gt;
both the paddingFactor and the paddingBytes.&lt;/p&gt;

&lt;p&gt;           oldObjSize += sz;&lt;br/&gt;
           oldObjSizeWithPadding += recOld-&amp;gt;netLength();&lt;/p&gt;

&lt;p&gt;           unsigned lenWHdr = sz + Record::HeaderSize;&lt;br/&gt;
           unsigned lenWPadding = lenWHdr;&lt;br/&gt;
           {&lt;br/&gt;
              lenWPadding = static_cast&amp;lt;unsigned&amp;gt;(pf*lenWPadding);&lt;br/&gt;
              lenWPadding += pb;&lt;br/&gt;
              lenWPadding = lenWPadding &amp;amp; quantizeMask(lenWPadding);&lt;br/&gt;
              if( lenWPadding &amp;lt; lenWHdr || lenWPadding &amp;gt; BSONObjMaxUserSize&lt;br/&gt;
/ 2 ) &lt;/p&gt;
{
                    lenWPadding = lenWHdr;
              }
&lt;p&gt;           }&lt;/p&gt;

&lt;p&gt;For now, I&apos;ll comment out the equation in the documentation.  Although,&lt;br/&gt;
from the code, it probably may be good to document that the&lt;br/&gt;
paddingFactor/Bytes may be overridden if the lengthWithThe Padding is less&lt;br/&gt;
then lengthWHdr or is too big.  But, I&apos;ll wait until discussing with&lt;br/&gt;
Mathias.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Kay&lt;/p&gt;



</comment>
                            <comment id="165093" author="kay.kim@10gen.com" created="Mon, 17 Sep 2012 17:07:29 +0000"  >&lt;p&gt;Hi Dan &amp;#8211;&lt;br/&gt;
we&apos;ve updated the document.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual/reference/command/compact/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/command/compact/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, this morning, you mentioned that the old DOC page seemed misleading&lt;br/&gt;
since the padding is on the documents rather than the collection.  Do you&lt;br/&gt;
want us to change the new page to explicitly state that the padding is on&lt;br/&gt;
the documents?&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Kay&lt;/p&gt;

</comment>
                            <comment id="165075" author="auto" created="Mon, 17 Sep 2012 16:40:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T09:39:57-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/72a324fc12df734e0298cc6d947ec26c0aaf571b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/72a324fc12df734e0298cc6d947ec26c0aaf571b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165074" author="auto" created="Mon, 17 Sep 2012 16:40:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T09:15:46-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt; &amp;#8211; fix the accidental combination of padding bytes and factor&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/22c5f8c57a6deb5c991caee09de935adabbda7a0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/22c5f8c57a6deb5c991caee09de935adabbda7a0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164989" author="auto" created="Mon, 17 Sep 2012 14:29:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T07:29:09-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt; style correction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/98879609c449031d510059cebcb1c93c001f2194&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/98879609c449031d510059cebcb1c93c001f2194&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164988" author="auto" created="Mon, 17 Sep 2012 14:29:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-17T07:25:56-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/75b890510c0895c75de4a994ff4a3aa124521a19&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/75b890510c0895c75de4a994ff4a3aa124521a19&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164985" author="auto" created="Mon, 17 Sep 2012 14:29:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-14T20:28:33-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-524&quot; title=&quot;Turn recommendation into example for padding with compact&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-524&quot;&gt;&lt;del&gt;DOCS-524&lt;/del&gt;&lt;/a&gt; change recommendation to example&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/b7ca8e24471bb2d53a5eba0dc7ed781be8a82630&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/b7ca8e24471bb2d53a5eba0dc7ed781be8a82630&lt;/a&gt;&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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 15 Sep 2012 03:03:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 22 weeks, 1 day 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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 22 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrsbhb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17092</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryk0f:</customfieldvalue>

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