<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Tue May 21 15:46:17 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/JCBC-157/JCBC-157.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>[JCBC-157] Unsure if CouchbaseConnectionFactory.pastReconnThreshold really does what it&apos;s suppose to do</title>
                <link>http://www.couchbase.com/issues/browse/JCBC-157</link>
                <project id="10080" key="JCBC">Couchbase Java Client</project>
                        <description>{code}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;private boolean pastReconnThreshold() {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;long currentTime = System.nanoTime();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (currentTime - thresholdLastCheck &amp;gt; 100000000) { //if longer than 10 sec&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;configThresholdCount = 0; // it&amp;#39;s been more than 10 sec since last&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// tried, so don&amp;#39;t try again just yet.&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;configThresholdCount++;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;thresholdLastCheck = currentTime;&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (configThresholdCount &amp;gt;= maxConfigCheck) {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
{code}&lt;br/&gt;
&lt;br/&gt;
Does the above really work as expected? It looks strange. 100000000 in nanos is only 100 millis and not 10 seconds as stated in comments. &lt;br/&gt;
If there is more than 100 millis between calls we always reset configThresholdCount and will never return true, which seems very strange.&lt;br/&gt;
</description>
                <environment>Oracle Jdk 1.6.0_26</environment>
            <key id="20982">JCBC-157</key>
            <summary>Unsure if CouchbaseConnectionFactory.pastReconnThreshold really does what it&apos;s suppose to do</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10011">Public</security>
                        <assignee username="ingenthr">Matt Ingenthron</assignee>
                                <reporter username="marcus.nylander@gmail.com">Marcus Nylander</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Nov 2012 03:54:04 -0600</created>
                <updated>Mon, 3 Dec 2012 03:26:46 -0600</updated>
                    <resolved>Mon, 3 Dec 2012 03:26:46 -0600</resolved>
                            <version>1.0.3</version>
                                <fixVersion>1.1-beta</fixVersion>
                                <component>library</component>
                                <votes>0</votes>
                        <watches>0</watches>
                                                    <comments>
                    <comment id="44918" author="daschl" created="Wed, 28 Nov 2012 04:17:49 -0600"  >can you take a look at this?</comment>
                    <comment id="44995" author="daschl" created="Thu, 29 Nov 2012 06:30:07 -0600"  >&lt;a href=&quot;http://review.couchbase.org/#/c/22902/&quot;&gt;http://review.couchbase.org/#/c/22902/&lt;/a&gt;</comment>
                    <comment id="44996" author="marcus.nylander@gmail.com" created="Thu, 29 Nov 2012 08:06:18 -0600"  >Checking the fix. Not that I&amp;#39;ve looked deeply into what pastReconnThreshold() should do, but just increasing the timeout? &lt;br/&gt;
Isn&amp;#39;t it more like it should return true every maxConfigCheck calls or return true if last call was more than 10 seconds ago?&lt;br/&gt;
&lt;br/&gt;
</comment>
                    <comment id="45198" author="daschl" created="Mon, 3 Dec 2012 03:26:46 -0600"  >fixed and pushed to master, will be available in beta.</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>11305</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10181" key="com.atlassian.jira.ext.charting:timeinstatus">
                <customfieldname>Time In Status</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                </customfields>
    </item>
</channel>
</rss>