<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:48:21 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-38233] Logging should not silently ignore errors</title>
                <link>https://jira.mongodb.org/browse/SERVER-38233</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, any failure to append a log message is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.5/src/mongo/logger/logstream_builder.cpp#L106&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;silently ignored&lt;/a&gt; (even though the appenders report failures).  (Note that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.5/src/mongo/logger/log_domain-impl.h#L58-L61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;LogDomain&apos;s &lt;tt&gt;_abortOnFailure&lt;/tt&gt;&lt;/a&gt; is initialised as false and only set to true for the audit log.)&lt;/p&gt;

&lt;p&gt;This isn&apos;t great, because it means that any given logfile might not actually be a complete record of the server&apos;s behaviour, which is an assumption that logfile analysis very frequently relies on.  Also, in the event of a permanent logging failure (eg. the logfile filesystem goes read-only), the server will continue to run (potentially for a long period of time) with no indication of any problem.&lt;/p&gt;

&lt;p&gt;Possible solutions might include:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Abort the server if a log message append fails.
	&lt;ul&gt;
		&lt;li&gt;Probably with a special exit code.&lt;/li&gt;
		&lt;li&gt;Possibly after outputting a/the message somewhere else that might be able to accept writes, eg:
		&lt;ul&gt;
			&lt;li&gt;stderr,&lt;/li&gt;
			&lt;li&gt;a special file in the dbpath or /tmp,&lt;/li&gt;
			&lt;li&gt;to syslog (if using logfile or console MongoDB logging).&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Increment a metric on log message append failure, and then expose it and/or act on it.  For example:
	&lt;ul&gt;
		&lt;li&gt;Expose it in serverStatus so that FTDC, the Cloud/Atlas monitoring agent, and free cloud monitoring (and possibly also the shell) can pick it up easily.&lt;/li&gt;
		&lt;li&gt;Increment of this metric could trigger replset primary stepdown.&lt;/li&gt;
		&lt;li&gt;Non-zero metric value could make the replset member effectively &lt;tt&gt;priority: 0&lt;/tt&gt; (ie. not eligible for election/votes).&lt;/li&gt;
		&lt;li&gt;The metric could be exposed to other members in replset heartbeats, and the other nodes could then log if they observe this value becoming non-zero, or increase, or otherwise log periodically whilst it&apos;s non-zero.&lt;/li&gt;
		&lt;li&gt;Adjust the storage watchdog to also monitor this metric, with repeated incrementing over several watchdog periods leading to server shutdown.  (In an attempt to catch permanent failures, while tolerating small brief transient failures.)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="637591">SERVER-38233</key>
            <summary>Logging should not silently ignore errors</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="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="henrik.edin@mongodb.com">Henrik Edin</assignee>
                                    <reporter username="kevin.pulo@mongodb.com">Kevin Pulo</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Nov 2018 02:10:59 +0000</created>
                <updated>Sun, 29 Oct 2023 22:26:24 +0000</updated>
                            <resolved>Tue, 24 Mar 2020 14:07:03 +0000</resolved>
                                                    <fixVersion>4.4.0-rc0</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                    <component>Logging</component>
                                        <votes>1</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="3003180" author="xgen-internal-githook" created="Thu, 26 Mar 2020 20:33:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Henrik Edin&apos;, &apos;username&apos;: &apos;henrikedin&apos;, &apos;email&apos;: &apos;henrik.edin@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38233&quot; title=&quot;Logging should not silently ignore errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38233&quot;&gt;&lt;del&gt;SERVER-38233&lt;/del&gt;&lt;/a&gt; Abort if we fail to write log to output stream&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e6e75a8bb7c95cca2a5f7ed028d497efbfe51078)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d449f5ed8dadc77f90163fde0cbd103f0fbb4073&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d449f5ed8dadc77f90163fde0cbd103f0fbb4073&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2994015" author="xgen-internal-githook" created="Tue, 24 Mar 2020 13:27:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;henrik.edin@mongodb.com&apos;, &apos;name&apos;: &apos;Henrik Edin&apos;, &apos;username&apos;: &apos;henrikedin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38233&quot; title=&quot;Logging should not silently ignore errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38233&quot;&gt;&lt;del&gt;SERVER-38233&lt;/del&gt;&lt;/a&gt; Abort if we fail to write log to output stream&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e6e75a8bb7c95cca2a5f7ed028d497efbfe51078&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e6e75a8bb7c95cca2a5f7ed028d497efbfe51078&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2080505" author="matt.lord" created="Tue, 4 Dec 2018 21:57:27 +0000"  >&lt;p&gt;I think that a new parameter called ~ abortOnLogFailure, defaulting to off, would make sense.&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></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, 26 Nov 2018 16:44:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 45 weeks, 6 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1234</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 45 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>
            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.lord</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hudiov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu3nlb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3633">Execution Team 2020-04-06</customfieldvalue>
    <customfieldvalue id="3671">Dev Tools 2020-03-09</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|hud4y7:</customfieldvalue>

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