<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Mon May 20 03:39:12 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/MB-6736/MB-6736.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>[MB-6736] Querying a view on a single node gives inconsistent_state error if bucket is empty</title>
                <link>http://www.couchbase.com/issues/browse/MB-6736</link>
                <project id="10010" key="MB">Couchbase Server</project>
                        <description>&lt;br/&gt;
This is reproducible on both build 1762 or repo sync + latest couchdb master&lt;br/&gt;
&lt;br/&gt;
Steps to reproduce:&lt;br/&gt;
1. Create default bucket(1 replica) and 1024 vbuckets.&lt;br/&gt;
2. Do no load any data&lt;br/&gt;
3. Create a view&lt;br/&gt;
&lt;br/&gt;
curl -v -X PUT -H &amp;#39;Content-Type: application/json&amp;#39; &amp;#39;&lt;a href=&quot;http://Administrator:&quot;&gt;http://Administrator:&lt;/a&gt;&lt;a href=&apos;mailto:asdasd@127.0.0.1&apos;&gt;asdasd@127.0.0.1&lt;/a&gt;:9500/default/_design/dev_d1&amp;#39; \&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-d &amp;#39;{&amp;quot;views&amp;quot;:{&amp;quot;v3&amp;quot;:{&amp;quot;map&amp;quot;:&amp;quot;function(doc){\nemit(doc._id,doc.n2);\n}&amp;quot;}}}&amp;#39;&lt;br/&gt;
bash&amp;gt; curl -v -X PUT -H &amp;#39;Content-Type: application/json&amp;#39; &amp;#39;&lt;a href=&quot;http://Administrator:&quot;&gt;http://Administrator:&lt;/a&gt;&lt;a href=&apos;mailto:asdasd@127.0.0.1&apos;&gt;asdasd@127.0.0.1&lt;/a&gt;:9500/default/_design/dev_d1&amp;#39; \&lt;br/&gt;
&amp;gt;    -d &amp;#39;{&amp;quot;views&amp;quot;:{&amp;quot;v3&amp;quot;:{&amp;quot;map&amp;quot;:&amp;quot;function(doc){\nemit(doc._id,doc.n2);\n}&amp;quot;}}}&amp;#39;&lt;br/&gt;
* About to connect() to 127.0.0.1 port 9500 (#0)&lt;br/&gt;
*   Trying 127.0.0.1... connected&lt;br/&gt;
* Connected to 127.0.0.1 (127.0.0.1) port 9500 (#0)&lt;br/&gt;
* Server auth using Basic with user &amp;#39;Administrator&amp;#39;&lt;br/&gt;
&amp;gt; PUT /default/_design/dev_d1 HTTP/1.1&lt;br/&gt;
&amp;gt; Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q=&lt;br/&gt;
&amp;gt; User-Agent: curl/7.21.4 (x86_64-unknown-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4&lt;br/&gt;
&amp;gt; Host: 127.0.0.1:9500&lt;br/&gt;
&amp;gt; Accept: */*&lt;br/&gt;
&amp;gt; Content-Type: application/json&lt;br/&gt;
&amp;gt; Content-Length: 67&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;lt; HTTP/1.1 201 Created&lt;br/&gt;
&amp;lt; Server: MochiWeb/1.0 (Any of you quaids got a smint?)&lt;br/&gt;
&amp;lt; Location: &lt;a href=&quot;http://127.0.0.1:9500/default/_design/dev_d1&quot;&gt;http://127.0.0.1:9500/default/_design/dev_d1&lt;/a&gt;&lt;br/&gt;
&amp;lt; Date: Wed, 26 Sep 2012 10:22:40 GMT&lt;br/&gt;
&amp;lt; Content-Type: text/plain;charset=utf-8&lt;br/&gt;
&amp;lt; Content-Length: 34&lt;br/&gt;
&amp;lt; Cache-Control: must-revalidate&lt;br/&gt;
&amp;lt; &lt;br/&gt;
{&amp;quot;ok&amp;quot;:true,&amp;quot;id&amp;quot;:&amp;quot;_design/dev_d1&amp;quot;}&lt;br/&gt;
* Connection #0 to host 127.0.0.1 left intact&lt;br/&gt;
* Closing connection #0&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
4. Query the view&lt;br/&gt;
curl -X GET &amp;#39;&lt;a href=&quot;http://Administrator:&quot;&gt;http://Administrator:&lt;/a&gt;&lt;a href=&apos;mailto:asdasd@127.0.0.1&apos;&gt;asdasd@127.0.0.1&lt;/a&gt;:9500/default/_design/dev_d1/_view/v3?stale=ok&amp;#39;&lt;br/&gt;
&lt;br/&gt;
* About to connect() to 127.0.0.1 port 9500 (#0)&lt;br/&gt;
*   Trying 127.0.0.1... connected&lt;br/&gt;
* Connected to 127.0.0.1 (127.0.0.1) port 9500 (#0)&lt;br/&gt;
* Server auth using Basic with user &amp;#39;Administrator&amp;#39;&lt;br/&gt;
&amp;gt; GET /default/_design/dev_d1/_view/v3?stale=ok HTTP/1.1&lt;br/&gt;
&amp;gt; Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q=&lt;br/&gt;
&amp;gt; User-Agent: curl/7.21.4 (x86_64-unknown-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4&lt;br/&gt;
&amp;gt; Host: 127.0.0.1:9500&lt;br/&gt;
&amp;gt; Accept: */*&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;lt; HTTP/1.1 500 Internal Server Error&lt;br/&gt;
&amp;lt; Server: MochiWeb/1.0 (Any of you quaids got a smint?)&lt;br/&gt;
&amp;lt; Date: Wed, 26 Sep 2012 10:29:32 GMT&lt;br/&gt;
&amp;lt; Content-Type: text/plain;charset=utf-8&lt;br/&gt;
&amp;lt; Content-Length: 48&lt;br/&gt;
&amp;lt; Cache-Control: must-revalidate&lt;br/&gt;
&amp;lt; &lt;br/&gt;
{&amp;quot;error&amp;quot;:&amp;quot;error&amp;quot;,&amp;quot;reason&amp;quot;:&amp;quot;inconsistent_state&amp;quot;}&lt;br/&gt;
* Connection #0 to host 127.0.0.1 left intact&lt;br/&gt;
* Closing connection #0&lt;br/&gt;
&lt;br/&gt;
Following error can be seen in the logs:&lt;br/&gt;
&lt;br/&gt;
[views:debug,2012-09-26T15:54:34.340,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:54:39.348,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:54:44.356,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:54:49.364,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:54:54.373,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:54:59.380,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:55:04.389,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:55:09.399,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
[views:debug,2012-09-26T15:55:14.408,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
Diagnostics are attached. </description>
                <environment>build 1762 or repo sync + latest couchdb master</environment>
            <key id="19899">MB-6736</key>
            <summary>Querying a view on a single node gives inconsistent_state error if bucket is empty</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="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="alkondratenko">Aleksey Kondratenko</assignee>
                                <reporter username="deepkaran.salooja">Deepkaran Salooja</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 05:37:19 -0500</created>
                <updated>Wed, 10 Oct 2012 07:17:16 -0500</updated>
                    <resolved>Wed, 26 Sep 2012 06:45:20 -0500</resolved>
                            <version>recent-builds-2.0</version>
                                <fixVersion>2.0-beta-2</fixVersion>
                                <component>view-engine</component>
                                <votes>0</votes>
                        <watches>2</watches>
                                                    <comments>
                    <comment id="39685" author="FilipeManana" created="Wed, 26 Sep 2012 05:55:57 -0500"  >Latest master is currently broken in many ways.&lt;br/&gt;
&lt;br/&gt;
Looking at logs:&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
[ns_server:info,2012-09-26T15:54:28.534,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12483.0&amp;gt;:compaction_daemon:check_all_dbs_exist:1271]Skipping compaction of bucket `default` since at least database `defa&lt;br/&gt;
[ns_server:debug,2012-09-26T15:54:28.535,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:compaction_daemon:compaction_daemon:handle_info:309]Finished compaction iteration.&lt;br/&gt;
[ns_server:debug,2012-09-26T15:54:28.536,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:compaction_daemon:compaction_daemon:schedule_next_compaction:1204]Finished compaction too soon. Next run will be in 30s&lt;br/&gt;
[couchdb:info,2012-09-26T15:54:34.335,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:couch_log:info:39]Set view `default`, group `_design/dev_d1`, missing partitions: [0,1,2,3,4,5,6,7,8,9,10,11,12,13&lt;br/&gt;
[views:debug,2012-09-26T15:54:34.340,&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;:&amp;lt;0.12439.0&amp;gt;:capi_view:design_doc_view_loop:56]Got `set_view_outdated` error. Retrying.&lt;br/&gt;
&lt;br/&gt;
Seems like some vbucket databases are not being created.&lt;br/&gt;
Don&amp;#39;t which component is causing this, but it&amp;#39;s certainly not the view engine, as this was working before build.&lt;br/&gt;
&lt;br/&gt;
The list of suspects, from Peter&amp;#39;s reply to a thread:&lt;br/&gt;
&lt;br/&gt;
==================&lt;br/&gt;
couchdb master...&lt;br/&gt;
8f678a3 Damien Katz, CBD-453 Exclude non-utf8 doc ids from views&lt;br/&gt;
b945921 Aliaksey Kandratsenka, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6612&quot; title=&quot;queries returns error {badmatch,{not_found,no_db_file}&quot;&gt;&lt;strike&gt;MB-6612&lt;/strike&gt;&lt;/a&gt;: exclude opening dbs from&lt;br/&gt;
all_known_databases_with_prefix&lt;br/&gt;
2613486 Aliaksey Kandratsenka, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6612&quot; title=&quot;queries returns error {badmatch,{not_found,no_db_file}&quot;&gt;&lt;strike&gt;MB-6612&lt;/strike&gt;&lt;/a&gt;: just store pid in couch server ets&lt;br/&gt;
tables&lt;br/&gt;
fa5b6fe Aliaksey Kandratsenka, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6612&quot; title=&quot;queries returns error {badmatch,{not_found,no_db_file}&quot;&gt;&lt;strike&gt;MB-6612&lt;/strike&gt;&lt;/a&gt;: open databases synchronously&lt;br/&gt;
7587aa0 Aliaksey Kandratsenka, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6612&quot; title=&quot;queries returns error {badmatch,{not_found,no_db_file}&quot;&gt;&lt;strike&gt;MB-6612&lt;/strike&gt;&lt;/a&gt;: stop maintaining open dbs lru&lt;br/&gt;
&lt;br/&gt;
==================ep-engine master...&lt;br/&gt;
c0084a7 Chiyoung Seo, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6676&quot; title=&quot;crash with couchstore in CouchKVStore::setVBucketState at src/couch-kvstore/couch-kvstore.cc:805 &quot;&gt;&lt;strike&gt;MB-6676&lt;/strike&gt;&lt;/a&gt; Don&amp;#39;t abort for communication failures with&lt;br/&gt;
mccouch&lt;br/&gt;
31c007f Chiyoung Seo, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6714&quot; title=&quot;ep-engine needs around 1 seconds to mark empty and closed checkpoint as persisted&quot;&gt;&lt;strike&gt;MB-6714&lt;/strike&gt;&lt;/a&gt; Create a new checkpoint for the non-empty&lt;br/&gt;
open checkpoint&lt;br/&gt;
6306271 Chiyoung Seo, &lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6714&quot; title=&quot;ep-engine needs around 1 seconds to mark empty and closed checkpoint as persisted&quot;&gt;&lt;strike&gt;MB-6714&lt;/strike&gt;&lt;/a&gt; Wake up the flusher after creating a&lt;br/&gt;
checkpoint by force&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
You need to redirect this to someone else or find yourself which commit in which of those components broke stuff.&lt;br/&gt;
</comment>
                    <comment id="39687" author="alkondratenko" created="Wed, 26 Sep 2012 06:18:50 -0500"  >I don&amp;#39;t know what you guys are talking about. It works on my box. Please double check your environment</comment>
                    <comment id="39688" author="alkondratenko" created="Wed, 26 Sep 2012 06:19:36 -0500"  >actually indeed. it does not work</comment>
                    <comment id="39689" author="alkondratenko" created="Wed, 26 Sep 2012 06:36:12 -0500"  >interesting. Simpler fix for 6612 was also merged (succefully!) on top of main fix. And naturally, caused problems.</comment>
                    <comment id="39690" author="alkondratenko" created="Wed, 26 Sep 2012 06:45:20 -0500"  >Revert uploaded to: &lt;a href=&quot;http://review.couchbase.org/#/c/21113/&quot;&gt;http://review.couchbase.org/#/c/21113/&lt;/a&gt;</comment>
                    <comment id="39713" author="thuan" created="Wed, 26 Sep 2012 10:35:32 -0500"  >Integrated in github-couchdb-preview #508 (See [&lt;a href=&quot;http://qa.hq.northscale.net/job/github-couchdb-preview/508/&quot;&gt;http://qa.hq.northscale.net/job/github-couchdb-preview/508/&lt;/a&gt;])&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6736&quot; title=&quot;Querying a view on a single node gives inconsistent_state error if bucket is empty&quot;&gt;&lt;strike&gt;MB-6736&lt;/strike&gt;&lt;/a&gt;: Revert &amp;quot;&lt;a href=&quot;http://www.couchbase.com/issues/browse/MB-6612&quot; title=&quot;queries returns error {badmatch,{not_found,no_db_file}&quot;&gt;&lt;strike&gt;MB-6612&lt;/strike&gt;&lt;/a&gt;: exclude opening dbs from...&amp;quot; (Revision 804ef001394269d3c02e3eb1ef05ac3a02f86c54)&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Result = SUCCESS&lt;br/&gt;
Farshid Ghods : &lt;br/&gt;
Files : &lt;br/&gt;
* src/couchdb/couch_server.erl&lt;br/&gt;
</comment>
                </comments>
                    <attachments>
                    <attachment id="15157" name="127.0.0.1-9000-diag.txt.gz" size="425321" author="deepkaran.salooja" created="Wed, 26 Sep 2012 05:37:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                        <customfield id="customfield_10180" key="com.atlassian.jira.ext.charting:firstresponsedate">
                <customfieldname>Date of First Response</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>Wed, 26 Sep 2012 05:55:57 -0500</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>3895</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>