<!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">2017-04-04 17:19:40 +0900 (Tue, 04 Apr 2017)</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/9914f50c2434add432ae3064be4e98b73169c80b">9914f50c2434add432ae3064be4e98b73169c80b</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</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; width: auto">cache: fix fetch return GRN_SUCCESS for not found case</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/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757">lib/cache.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; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: lib/cache.c (+7 -0)</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; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L419">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L420">420</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L421">421</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L422">422</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L423">423</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L424">424</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/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L425">425</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L426">426</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757L427">427</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; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R419">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R420">420</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R421">421</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R422">422</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R423">423</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R424">424</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R425">425</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R426">426</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R427">427</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R428">428</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R429">429</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R430">430</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R431">431</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R432">432</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R433">433</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/9914f50c2434add432ae3064be4e98b73169c80b#diff-77dc4b01de73d3c8e529de2216371757R434">434</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; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -420,8 +420,15 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_cache_fetch_persistent(grn_ctx *ctx, grn_cache *cache,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     return rc;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+  /* TODO: How about GRN_NOT_FOUND? */</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+  rc = GRN_INVALID_ARGUMENT;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   cache-&gt;nfetches++;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   cache_id = grn_hash_get(cache-&gt;ctx, keys, key, key_len, (void **)&amp;entry);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+  if (cache_id == GRN_ID_NIL) {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    goto exit;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+  }</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (cache_id != GRN_ID_NIL) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     if (entry-&gt;modified_time.tv_sec &lt;=</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         grn_db_get_last_modified(ctx, ctx-&gt;impl-&gt;db)) {</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>