<!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 &lt;kou****@clear*****&gt;</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, &quot;Liberation Mono&quot;, 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(). :&lt;</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, &quot;Liberation Mono&quot;, 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, &quot;Liberation Mono&quot;, 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">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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, &quot;Liberation Mono&quot;, 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">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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, &quot;Liberation Mono&quot;, 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">-            &quot;vm.overcommit_memory kernel parameter should be 1: &lt;%c&gt;&quot;, 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">+            &quot;vm.overcommit_memory kernel parameter should be 1: &lt;%c&gt;: &quot;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            &quot;See INFO level log to resolve this&quot;,</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">             &quot;Some processings with vm.overcommit_memory != 1 &quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             &quot;may break DB under low memory condition.&quot;);</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">             &quot;To set vm.overcommit_memory to 1&quot;);</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">             &quot;add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and &quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             &quot;restart your system or&quot;);</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">             &quot;run 'sudo /sbin/sysctl vm.overcommit_memory=1' command.&quot;);</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>