<!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">YUKI &quot;Piro&quot; Hiroshi &lt;piro.****@gmail*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2015-04-14 23:43:54 +0900 (Tue, 14 Apr 2015)</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db">f8892dcb718b6798b59fbf023291bacfee55f9db</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">Support scattar without record for version1 catalog</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#diff-0">lib/droonga/catalog/version1.rb</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/droonga/catalog/version1.rb (+8 -1)</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L396">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L397">397</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L398">398</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L399">399</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L400">400</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-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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L401">401</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L402">402</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L403">403</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L406">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L407">407</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L408">408</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L409">409</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L410">410</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L411">411</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0L412">412</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R396">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R397">397</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R398">398</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R399">399</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/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R400">400</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R401">401</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R402">402</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R403">403</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R404">404</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R405">405</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R406">406</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R407">407</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R408">408</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R409">409</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R412">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R413">413</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R414">414</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R415">415</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R416">416</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R417">417</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R418">418</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/f8892dcb718b6798b59fbf023291bacfee55f9db#L0R419">419</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">@@ -397,7 +397,13 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">module Droonga</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">               select_range_and_replicas(partition, args, routes)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             end</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           when &quot;scatter&quot;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-            name = get_partition(args[&quot;record&quot;][&quot;_key&quot;])</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            record = args[&quot;record&quot;]</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            if record</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+              key = record[&quot;_key&quot;]</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            else</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+              key = nil</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            end</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+            name = get_partition(key)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             partition = self[&quot;ring&quot;][name]</span>
<span class="diff-not-changed" style="display: block; white-space: pre">             select_range_and_replicas(partition, args, routes)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           end</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -407,6 +413,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">module Droonga</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">         def get_partition(key)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           continuum = self[&quot;continuum&quot;]</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           return self[&quot;ring&quot;].keys[0] unless continuum</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+          return continuum.sample[1] unless key</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           key = key.to_s unless key.is_a?(String)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           hash = Zlib.crc32(key)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">           min = 0</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>