You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Ciaran Gultnieks (JIRA)" <ji...@apache.org> on 2008/08/05 13:38:44 UTC

[jira] Created: (COUCHDB-99) Broken pagination when browsing database

Broken pagination when browsing database
----------------------------------------

                 Key: COUCHDB-99
                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
             Project: CouchDB
          Issue Type: Bug
          Components: Administration Console
    Affects Versions: 0.9
         Environment: Debian server, Firefox 3 client
            Reporter: Ciaran Gultnieks
            Priority: Minor


The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-99) Broken pagination when browsing database

Posted by "Jason Davies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641408#action_12641408 ] 

Jason Davies commented on COUCHDB-99:
-------------------------------------

I'm seeing a possibly related issue: when displaying custom view, only the first 10 rows are shown, with no "next" link, even though there are 31 rows in total.  I can view the 31 rows if I set the number of rows per page to 100 instead of 10.

> Broken pagination when browsing database
> ----------------------------------------
>
>                 Key: COUCHDB-99
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Debian server, Firefox 3 client
>            Reporter: Ciaran Gultnieks
>            Priority: Minor
>         Attachments: test_all_docs_offset.diff
>
>
> The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-99) Broken pagination when browsing database

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Anderson updated COUCHDB-99:
----------------------------------

    Attachment: test_all_docs_offset.diff

This patch is merely the test that must pass in order to verify that the bug has been fixed. Uploading it here so that others may attack the bug with confidence.

> Broken pagination when browsing database
> ----------------------------------------
>
>                 Key: COUCHDB-99
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Debian server, Firefox 3 client
>            Reporter: Ciaran Gultnieks
>            Priority: Minor
>         Attachments: test_all_docs_offset.diff
>
>
> The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-99) Broken pagination when browsing database

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634330#action_12634330 ] 

Chris Anderson commented on COUCHDB-99:
---------------------------------------

After some debugging, I'm stumped, but the place to pickup, for anyone who's interested, I think, is

couchdb_updater:btree_by_id_reduce(reduce, FullDocInfos)

If you log the FullDocInfos, you'll see that some of the arguments as they come in, don't match the full_doc_info record. Hence, they are not counted in either column.

It seems that docs that come before the startkey are the ones that don't show up as full_doc_info records in the function, and those which are after the startkey are just fine. I'm not sure why this would be -- might be in the heart of couch_btree:stream_kp_node, but I can't see a reason for this behavior. 

Or I could be on the totally wrong track. When this bug is fixed I'll definitely be curious to read the diffs!

> Broken pagination when browsing database
> ----------------------------------------
>
>                 Key: COUCHDB-99
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Debian server, Firefox 3 client
>            Reporter: Ciaran Gultnieks
>            Priority: Minor
>
> The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (COUCHDB-99) Broken pagination when browsing database

Posted by "Damien Katz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damien Katz closed COUCHDB-99.
------------------------------

    Resolution: Fixed
      Assignee: Damien Katz

Fix because skipped reduction values weren't getting assembled before reduction.

Callers of btrees are allowed to use complex objects instead of key/value pair tuples, if they also provide a function to extract the key and the value from the complex object, and another function to re-assemble it. This re-assemble step wasn't happening with certain skipped keys, meaning they couldn't be reduced properly.

> Broken pagination when browsing database
> ----------------------------------------
>
>                 Key: COUCHDB-99
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Debian server, Firefox 3 client
>            Reporter: Ciaran Gultnieks
>            Assignee: Damien Katz
>            Priority: Minor
>         Attachments: test_all_docs_offset.diff
>
>
> The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-99) Broken pagination when browsing database

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634259#action_12634259 ] 

Chris Anderson commented on COUCHDB-99:
---------------------------------------

This is a problem with the _all_docs view not returning the correct offset. Instead of giving the actual offset, _all_docs returns the skip value as the offset. Investigating a fix...

Normal views don't have this problem, just _all_docs.

> Broken pagination when browsing database
> ----------------------------------------
>
>                 Key: COUCHDB-99
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-99
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Debian server, Firefox 3 client
>            Reporter: Ciaran Gultnieks
>            Priority: Minor
>
> The pagination is broken when browsing a database. For example, on initially clicking to view the database I see "Showing 1-25 of 7357 rows". Then after clicking the 'Next Page' link, I get "Showing 2-26 of 7357 rows".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.