<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Wed May 22 10:10:37 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/SPY-93/SPY-93.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[SPY-93] Hard-coded 1 second delay in spy could be avoided</title>
                <link>http://www.couchbase.com/issues/browse/SPY-93</link>
                <project id="10047" key="SPY">Spymemcached Java Client</project>
                        <description>This is based on cbse-87&lt;br/&gt;
&lt;br/&gt;
We must supply a username to the MemcacheClient constructor and this sets up an authentication step which I&amp;#39;d thought wasn&amp;#39;t required**. Authentication causes issues when a node goes down: every operation destined for that node waits 1 second (hard-coded) for the authentication to clear*. O f course since the node is unavailable, the auth never comes. Then, every op continues to take a full second as opposed to failing fast. The client app then slows to a crawl because one node is down.&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Is it possible to eliminate this authentication? I&amp;#39;ve tried setting the username to null but the connections to the cluster keep resetting.&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* See spy class TCPMemcachedNodeImpl. Method addOp() waits for the authLatch. The authLatch gets set to 1 but never counts down.&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;**Our buckets use dedicated ports and ...&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;When a client connects to a server on a host and dedicated port number, it may use either memcached/membase binary or ASCII protocols, and SASL authentication is not required.&amp;quot;&lt;br/&gt;
&lt;br/&gt;
Workaround:&lt;br/&gt;
&lt;br/&gt;
I did implement our own check for down nodes. Basically, I created a connection tracker that implements ConnectionObserver which is given to MemcachedClient.addObserver(). It tracks the status of all nodes and maintains a list of down nodes. If any are down, then before sending down an operation to the memcachedClient, it checks if the operation would go to the down node and prevents the operation from being submitted. The tracker makes use of the NodeLocator.getPrimary(key)&amp;#39;s socketAddress. Only when a node(s) is down would every operation suffer a bit of hashing check. When the node comes back up, my tracker gets notified, and with the down node cleared, the hash check is stopped.&lt;br/&gt;
&lt;br/&gt;
Something like that should be built into the spy code. </description>
                <environment></environment>
            <key id="18689">SPY-93</key>
            <summary>Hard-coded 1 second delay in spy could be avoided</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10011">Public</security>
                        <assignee username="daschl">Michael Nitschinger</assignee>
                                <reporter username="rags">Raghavan Srinivas</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Jul 2012 16:11:27 -0500</created>
                <updated>Tue, 13 Nov 2012 07:47:55 -0600</updated>
                                    <version>2.7.3</version>
                                                <component>library</component>
                                <votes>0</votes>
                        <watches>0</watches>
                                                            <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>9511</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>