<!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 Hiroshi <shimo****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2015-04-20 11:24:24 +0900 (Mon, 20 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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30">6356609de89d548cd67ab98d6e3091ccfc6dac30</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, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Don't create new connection for an engine node while cluster structure is changing</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#diff-0">lib/adapter/http.js</a></li>
<li><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#diff-1">lib/droonga-protocol/connection-pool.js</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; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/adapter/http.js (+11 -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, "Liberation Mono", 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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L2">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L3">3</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L4">4</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L5">5</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-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L6">6</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L7">7</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L8">8</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L94">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L95">95</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L96">96</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L97">97</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-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-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/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L98">98</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L99">99</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0L100">100</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; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R2">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R3">3</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R4">4</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R5">5</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R6">6</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R7">7</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R8">8</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R9">9</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R10">10</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R96">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R97">97</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R98">98</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R99">99</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R100">100</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R101">101</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R102">102</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R103">103</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R104">104</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R105">105</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R106">106</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R107">107</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R108">108</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R109">109</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R110">110</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L0R111">111</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; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -3,6 +3,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">var wrapper = require('./wrapper');</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var api = require('./api');</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var ConsoleLogger = require('../console-logger').ConsoleLogger;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+var CONNECTION_RETRY_INTERVAL = 1000;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> function createRequestResponseHandler(params) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> params = params || {};</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var connectionPool = params.connectionPool;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -95,6 +97,15 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function createGenericHandler(params) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var connection = connectionPool.get();</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (!connection) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // When the cluster members are changing, we cannot get</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // actual connection for a member, so retry later.</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ setTimeout(function() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ processRequest();</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }, CONNECTION_RETRY_INTERVAL);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var wrappedConnection = new wrapper.DroongaProtocolConnectionWrapper(connection, options);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> try {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> definition.onHandle(request, response, wrappedConnection);</span>
</pre>
</td>
</tr>
</tbody>
</table>
<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; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/droonga-protocol/connection-pool.js (+11 -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, "Liberation Mono", 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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L68">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L70">70</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L71">71</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-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/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L72">72</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L73">73</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L74">74</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L195">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L196">196</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L197">197</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L198">198</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/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L199">199</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L200">200</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L201">201</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L208">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L209">209</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L210">210</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L211">211</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/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L212">212</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L213">213</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L214">214</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L215">215</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L216">216</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/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L217">217</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L218">218</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1L219">219</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; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R68">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R70">70</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R71">71</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R72">72</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R73">73</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R74">74</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R75">75</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R76">76</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R77">77</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R78">78</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R79">79</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R200">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R201">201</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R202">202</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R203">203</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R204">204</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R205">205</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R206">206</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R207">207</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R208">208</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R209">209</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R210">210</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R217">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R218">218</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R219">219</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R220">220</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R221">221</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R222">222</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R223">223</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R224">224</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R225">225</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R226">226</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/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R227">227</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R228">228</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R229">229</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/express-droonga/commit/6356609de89d548cd67ab98d6e3091ccfc6dac30#L1R230">230</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; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -69,6 +69,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">ConnectionPool.prototype = {</span></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-not-changed" style="display: block; white-space: pre"> get: function() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // When the cluster members are changing, we cannot get</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ // actual connection for a member.</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (this.updating)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return null;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var hostName = this.hostNames[this.nextIndex];</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this.nextIndex++;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -196,6 +201,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">ConnectionPool.prototype = {</span></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-not-changed" style="display: block; white-space: pre"> updateHostNamesFromCluster: function() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (this.updating)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return Q.Promise.resolve();</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.updating = true;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return this.getEnginesFromCluster()</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> .then((function(engines) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this.clusterId = engines[0].Tags.cluster_id;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -209,11 +218,13 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">ConnectionPool.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this._logger.info('List of droonga-engine hosts is successfully initialized from the cluster.');</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this._logger.info('cluster id: '+this.clusterId);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this._logger.info(hostNames);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.updating = false;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return hostNames;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }).bind(this))</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> .catch(function(error) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this._logger.error('Failed to initialize the list of droonga-engine hosts from the cluster.');</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this._logger.error(error);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.updating = false;</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-not-changed" style="display: block; white-space: pre"> </span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>