<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-09 18:41:55 +0900 (Thu, 09 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac">02f176b5db2587385f28792b9600bd173306e3ac</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">Log details about vm.overcommit_memory
But it never be showen because we can't change the default log level
before grn_init(). :<</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#diff-0">lib/ctx.c</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/ctx.c (+7 -5)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L775">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L776">776</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L777">777</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L778">778</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L779">779</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L780">780</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L781">781</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L782">782</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L783">783</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L784">784</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L785">785</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L786">786</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L787">787</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L788">788</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L789">789</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L790">790</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0L791">791</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R775">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R776">776</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R777">777</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R778">778</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R779">779</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R780">780</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R781">781</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R782">782</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R783">783</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R784">784</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R785">785</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R786">786</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R787">787</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R788">788</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R789">789</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R790">790</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R791">791</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R792">792</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/02f176b5db2587385f28792b9600bd173306e3ac#L0R793">793</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -776,16 +776,18 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">check_overcommit_memory(grn_ctx *ctx)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> value = fgetc(file);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (value != '1') {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_LOG(ctx, GRN_LOG_NOTICE,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- "vm.overcommit_memory kernel parameter should be 1: <%c>", value);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_LOG(ctx, GRN_LOG_NOTICE,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "vm.overcommit_memory kernel parameter should be 1: <%c>: "</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "See INFO level log to resolve this",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ value);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_LOG(ctx, GRN_LOG_INFO,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "Some processings with vm.overcommit_memory != 1 "</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "may break DB under low memory condition.");</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_LOG(ctx, GRN_LOG_NOTICE,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_LOG(ctx, GRN_LOG_INFO,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "To set vm.overcommit_memory to 1");</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_LOG(ctx, GRN_LOG_NOTICE,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_LOG(ctx, GRN_LOG_INFO,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and "</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "restart your system or");</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- GRN_LOG(ctx, GRN_LOG_NOTICE,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ GRN_LOG(ctx, GRN_LOG_INFO,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "run 'sudo /sbin/sysctl vm.overcommit_memory=1' command.");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> fclose(file);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>