<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:24:41 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-30689] Add command to flush the WiredTiger cache</title>
                <link>https://jira.mongodb.org/browse/SERVER-30689</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Many developers resort to bouncing the MongoDB instance between test runs in order to clear the WiredTiger cache. While this method will accomplish the goal of purging the cache, it is extremely inefficient. In addition, in some organizations, developers do not have the required grants to restart the server. &lt;/p&gt;
</description>
                <environment></environment>
        <key id="417094">SERVER-30689</key>
            <summary>Add command to flush the WiredTiger cache</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="alexander.gorrod@mongodb.com">Alexander Gorrod</assignee>
                                    <reporter username="dmitry.agranat@mongodb.com">Dmitry Agranat</reporter>
                        <labels>
                            <label>refinement</label>
                    </labels>
                <created>Wed, 16 Aug 2017 13:55:00 +0000</created>
                <updated>Tue, 9 Jan 2024 16:11:59 +0000</updated>
                                                                            <component>WiredTiger</component>
                                        <votes>3</votes>
                                    <watches>32</watches>
                                                                                                                <comments>
                            <comment id="5996178" author="alexander.gorrod" created="Tue, 9 Jan 2024 04:45:30 +0000"  >&lt;p&gt;Sorry for the delayed response. This feature request is languishing because it represents a significant amount of engineering work and the use cases we&apos;ve had reported generally won&apos;t be well served by the suggested change.&lt;/p&gt;

&lt;p&gt;From what I have seen, the primary goal is to reduce cycle time for testing and benchmarking environments. In such environments, reducing the amount of work done from restarting MongoDB to flushing content in the active cache is unlikely to achieve the desired outcome of a &quot;clean slate&quot; from which to run another iteration of testing/benchmarking. There are many holders of resources (including memory) outside of the WiredTiger cache, and those resources are likely to be meaningful to test and benchmark results.&lt;/p&gt;

&lt;p&gt;I&apos;m hesitant to close out the ticket, since it is a valid feature request, and having an open Jira ticket gives a good place to find some context and get answers to questions about the functionality.&lt;/p&gt;

&lt;p&gt;If I have misunderstood a use case or benefit, please let me know, and we can explore enhancements that will improve the behavior of MongoDB.&lt;/p&gt;</comment>
                            <comment id="5598699" author="dhananjay.ghevde" created="Fri, 28 Jul 2023 15:39:06 +0000"  >&lt;p&gt;I have a customer who is interested in functionality. can we have an update on this? Let me know who should I follow up with if this is not the correct forum.&lt;/p&gt;</comment>
                            <comment id="4376217" author="alexander.gorrod" created="Fri, 25 Feb 2022 04:26:34 +0000"  >&lt;p&gt;It feels like there might be some genuine new use cases here, I&apos;m going to assign this to the right backlog instead of me.&lt;/p&gt;

&lt;p&gt;The Storage Engines team will be happy to chat about what use cases are being addressed here, and what we can do in WiredTiger to make them possible.&lt;/p&gt;</comment>
                            <comment id="4302945" author="milkie" created="Thu, 20 Jan 2022 15:13:29 +0000"  >&lt;p&gt;Now that we have table-import capability in WiredTiger, we might be able to implement this ticket for specific tables by doing the following in the MongoDB layer:&lt;br/&gt;
1. Dropping the table in WT but setting the &quot;do not delete on-disk file&quot; option.&lt;br/&gt;
2. Immediately re-adding the table via import.&lt;/p&gt;</comment>
                            <comment id="4302653" author="redbeard0531" created="Thu, 20 Jan 2022 13:38:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.gorrod&quot; class=&quot;user-hover&quot; rel=&quot;alexander.gorrod&quot;&gt;alexander.gorrod&lt;/a&gt;, I&apos;m hoping that you will reconsider this ticket with some additional information that should address your concerns. Of course, if the implementation complexity outweighs the benefit, that is another issue, but that didn&apos;t seem like it was your primary objection.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I don&apos;t think the value added by implementing this functionality outweighs the consequences of potential API misuse, so I&apos;m going to close this ticket as &quot;Won&apos;t fix&quot;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I know that you are concerned about misuse, but at the mongo layer we already have mechanisms to deal with this. The most important is that some commands can be tagged as &quot;test only&quot; so they are only available when the server is started with a special flag to indicate that it is in test mode. This includes things like setting failpoints where the whole purpose is to &quot;break&quot; the behavior of the system in order to test out hard to reach edge cases.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;A user who does not have permission to restart the server should also not have permissions to purge the WiredTiger cache on a server.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Not that it should be available in production anyway (see above), but I assume that this command would require admin permisions, just like the shutdown command (which is different from permission to restart the server, since that requires system permissions outside of mongodb). As a possible exception, if we allowed purges at the level of tables, we could lower the permissions to be similar to dropping that table. I don&apos;t think you would object to someone who is allowed to shutdown the server or drop a table being able to purge its cache.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;There is no evidence that bounding the MongoDB instance would be less efficient than purging the cache. In fact there are some optimizations when shutting down MongoDB that mean it could be more efficient than a cache purge.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;We actually &lt;b&gt;dont&lt;/b&gt; want those optimizations when benchmarking. We already have a problem with our benchmarks reflecting an &quot;overly clean slate&quot; of running, which is not the state we care about (with obvious exceptions like time to bring up a new host, or responsiveness on failover). In general, we really care about the steady-state performance of a system that has been up for a while. While purging the cache isn&apos;t exactly the same, it is closer than when doing a clean start. It would really be ideal if we could easily emulate the cache being filled with &quot;junk&quot; than needs to be purged on demand while the test is running. But I assume that would be much more complicated to implement&lt;/p&gt;</comment>
                            <comment id="1658139" author="alexander.gorrod" created="Mon, 28 Aug 2017 06:01:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dmitry.agranat&quot; class=&quot;user-hover&quot; rel=&quot;dmitry.agranat&quot;&gt;dmitry.agranat&lt;/a&gt; This functionality adds very little value to users of MongoDB and would expose functionality that could easily cause major service disruption if mis-used. I don&apos;t think the value added by implementing this functionality outweighs the consequences of potential API misuse, so I&apos;m going to close this ticket as &quot;Won&apos;t fix&quot;.&lt;/p&gt;

&lt;p&gt; In response to the particular use case in the ticket:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Many developers resort to bouncing the MongoDB instance between test runs in order to clear the WiredTiger cache. While this method will accomplish the goal of purging the cache, it is extremely inefficient.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;There is no evidence that bounding the MongoDB instance would be less efficient than purging the cache. In fact there are some optimizations when shutting down MongoDB that mean it could be more efficient than a cache purge.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;... developers do not have the required grants to restart the server.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;A user who does not have permission to restart the server should also not have permissions to purge the WiredTiger cache on a server.&lt;/p&gt;</comment>
                            <comment id="1652321" author="bruce.lucas@10gen.com" created="Sun, 20 Aug 2017 11:19:53 +0000"  >&lt;p&gt;I wonder if flushing the cache is actually faster than restarting mongod, particularly for large caches - flushing the cache requires freeing a lot of small data structures. Also this won&apos;t necessarily leave the allocator in the same state it is in after a restart, and that potentially has an impact on performance.&lt;/p&gt;</comment>
                            <comment id="1652054" author="asya" created="Sat, 19 Aug 2017 03:15:24 +0000"  >&lt;p&gt;What is the thinking behind clearing the cache being more efficient?  To prevent the cache from being &quot;dirtied&quot; while it&apos;s being flushed to disk, wouldn&apos;t the writes have to be stopped - basically making this not any more efficient than a simple re-start?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1891180">WT-8208</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000YgGWUIA3, 500A000000ZfTneIAF, 5002K00000d01WQQAY, 5006R00001v6vElQAI]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 19 Aug 2017 03:15:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>milkie@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alexander.gorrod@mongodb.com</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>dhananjay.ghevde@mongodb.com</customfieldvalue>
            <customfieldvalue>dmitry.agranat@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htd3jb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0bmtr:</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_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</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|htcpm7:</customfieldvalue>

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