<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Sat May 25 17:16:02 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-142/JCBC-142.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-142] Observe Tests show that something is wrong in the observe impl</title>
                <link>http://www.couchbase.com/issues/browse/JCBC-142</link>
                <project id="10080" key="JCBC">Couchbase Java Client</project>
                        <description>The newly added observe viewtests show that sometimes the full result sets are returned and sometimes not. This strongly correlates with the number of sets done in a given timeframe so I suppose the current observe implementation has a bug somewhere.&lt;br/&gt;
&lt;br/&gt;
Also, the observe test inside the CouchbaseClient fails sometime which may correlate to the same issue.</description>
                <environment></environment>
            <key id="20616">JCBC-142</key>
            <summary>Observe Tests show that something is wrong in the observe impl</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="6" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10011">Public</security>
                        <assignee username="mikew">Mike Wiederhold</assignee>
                                <reporter username="daschl">Michael Nitschinger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Nov 2012 02:41:36 -0600</created>
                <updated>Mon, 3 Dec 2012 05:36:19 -0600</updated>
                    <resolved>Tue, 27 Nov 2012 07:31:48 -0600</resolved>
                            <version>1.1-dp4</version>
                                <fixVersion>1.1-beta</fixVersion>
                                <component>library</component>
                                <votes>0</votes>
                        <watches>0</watches>
                                                    <comments>
                    <comment id="43669" author="daschl" created="Fri, 9 Nov 2012 12:20:08 -0600"  >This is the test to reproduce it: &lt;a href=&quot;https://github.com/couchbase/couchbase-java-client/commit/df5b6a53bbd61ca8daf64d56919e79d81870355e&quot;&gt;https://github.com/couchbase/couchbase-java-client/commit/df5b6a53bbd61ca8daf64d56919e79d81870355e&lt;/a&gt;&lt;br/&gt;
(you may have to increase the amount of sets to be done to make sure the disk queue takes some time to get flushed)</comment>
                    <comment id="43675" author="daschl" created="Fri, 9 Nov 2012 12:48:51 -0600"  >Please reproduce with another client and assign it back to me if it appears to be a client library issue.&lt;br/&gt;
&lt;br/&gt;
thanks!</comment>
                    <comment id="43710" author="mnunberg" created="Fri, 9 Nov 2012 18:21:25 -0600"  >I&amp;#39;ve tried to replicate this in PHP, but without success.&lt;br/&gt;
&lt;br/&gt;
It sounds like the observe operation is failing and therefore the view is returning bad results. I&amp;#39;m not familiar with the Java API, but the set+persist wouldn&amp;#39;t throw an exception if it fails - you&amp;#39;d need to check the future.getStatus().isSuccess() or something.&lt;br/&gt;
&lt;br/&gt;
I&amp;#39;m pasting a very ad-hoc test that I&amp;#39;ve written for PHP (more comments will be inline with that)</comment>
                    <comment id="43724" author="mnunberg" created="Fri, 9 Nov 2012 20:02:43 -0600"  >Update:&lt;br/&gt;
&lt;br/&gt;
I&amp;#39;ve re-run the tests with a two node cluster. I see similar behavior. This looks like a server bug.</comment>
                    <comment id="43725" author="mnunberg" created="Fri, 9 Nov 2012 20:29:01 -0600"  >Michael, can you modify the test code to check for observe exceptions (and in general make it function more similarly to the php code).&lt;br/&gt;
&lt;br/&gt;
This way we can have confident confirmation from both clients, and file a server bug&lt;br/&gt;
&lt;br/&gt;
Failed observe does not throw an exception, as per&lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;https://github.com/couchbase/couchbase-java-client/blob/df5b6a53bbd61ca8daf64d56919e79d81870355e/src/main/java/com/couchbase/client/CouchbaseClient.java#L909&quot;&gt;https://github.com/couchbase/couchbase-java-client/blob/df5b6a53bbd61ca8daf64d56919e79d81870355e/src/main/java/com/couchbase/client/CouchbaseClient.java#L909&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
(From then same revision linked to in the description).</comment>
                    <comment id="43731" author="mnunberg" created="Fri, 9 Nov 2012 22:50:36 -0600"  >I&amp;#39;ve actually revised the tests to work the way I needed them to.. (for some reason the observe in java is slower than I had hoped for, so I ended up making my own threaded contraption to solve this...) -- might this be a separate bug?&lt;br/&gt;
&lt;br/&gt;
anyway.. I&amp;#39;ve observed duplicate behavior:&lt;br/&gt;
&lt;br/&gt;
Basically, many of the times, the stale test fails, returning *exactly* half of the keys in the view.&lt;br/&gt;
&lt;br/&gt;
Maybe my cluster config is funky, but this is doubtful..&lt;br/&gt;
&lt;br/&gt;
Anyway, we&amp;#39;ll file a cluster bug with a 100% certainty that this is a client issue.&lt;br/&gt;
&lt;br/&gt;
btw, I&amp;#39;d actually advocate keeping the threaded contraption there (in the commit I accidentally saved it as a single worker, might want to bump it up)..&lt;br/&gt;
&lt;br/&gt;
Placing load on the server (i.e. by using multiple setter threads) seems to highlight this issue.. and I have a feeling it&amp;#39;s a lag/race condition sort of thing.&lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;https://github.com/mnunberg/couchbase-java-client/commit/3d788ab9d3a88c1dc20717c4dd110e3a8bb5f5bc&quot;&gt;https://github.com/mnunberg/couchbase-java-client/commit/3d788ab9d3a88c1dc20717c4dd110e3a8bb5f5bc&lt;/a&gt;</comment>
                    <comment id="43732" author="mnunberg" created="Fri, 9 Nov 2012 22:55:10 -0600"  >java.lang.AssertionError: expected:&amp;lt;500&amp;gt; but was:&amp;lt;180&amp;gt;&lt;br/&gt;
	at org.junit.Assert.fail(Assert.java:91)&lt;br/&gt;
	at org.junit.Assert.failNotEquals(Assert.java:645)&lt;br/&gt;
	at org.junit.Assert.assertEquals(Assert.java:126)&lt;br/&gt;
	at org.junit.Assert.assertEquals(Assert.java:470)&lt;br/&gt;
	at org.junit.Assert.assertEquals(Assert.java:454)&lt;br/&gt;
	at com.couchbase.client.ViewTest.testObserveWithStaleFalse(ViewTest.java:839)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;br/&gt;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
	at java.lang.reflect.Method.invoke(Method.java:616)&lt;br/&gt;
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)&lt;br/&gt;
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)&lt;br/&gt;
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)&lt;br/&gt;
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)&lt;br/&gt;
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)&lt;br/&gt;
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)&lt;br/&gt;
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)&lt;br/&gt;
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;br/&gt;
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)&lt;br/&gt;
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)&lt;br/&gt;
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)&lt;br/&gt;
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)&lt;br/&gt;
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)&lt;br/&gt;
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)&lt;br/&gt;
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)&lt;br/&gt;
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)&lt;br/&gt;
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)&lt;br/&gt;
</comment>
                    <comment id="43883" author="ingenthr" created="Tue, 13 Nov 2012 07:52:00 -0600"  >Note that this one is being worked by the server team, since it looks like a server issue.  No action needed here at the moment.</comment>
                    <comment id="43970" author="daschl" created="Wed, 14 Nov 2012 09:41:31 -0600"  >Is there a ticket we can link to?</comment>
                    <comment id="44399" author="ingenthr" created="Mon, 19 Nov 2012 23:20:08 -0600"  >Mike had been in here earlier today and thinks he knows where the issue is, so passing assignment to him.</comment>
                    <comment id="44524" author="daschl" created="Wed, 21 Nov 2012 05:21:18 -0600"  >Fixed and pushed to master, will be available in dp5!</comment>
                    <comment id="44533" author="daschl" created="Wed, 21 Nov 2012 07:21:56 -0600"  >Looks like this is still not solved, from time to time the test still shows missing documents!</comment>
                    <comment id="44840" author="daschl" created="Tue, 27 Nov 2012 07:31:48 -0600"  >Test case was flawed, now fixed and pushed.</comment>
                </comments>
                    <attachments>
                    <attachment id="15765" name="observe-test.php" size="2328" author="mnunberg" created="Fri, 9 Nov 2012 19:14:41 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>10131</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>