couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-858) GET /db/_design/doc/_info should not trigger an update
Date Mon, 25 Oct 2010 16:35:24 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924622#action_12924622
] 

Filipe Manana commented on COUCHDB-858:
---------------------------------------

Thanks Klaus.
With your latest patch, the test doesn't pass. The following modifications make it pass:

diff --git a/share/www/script/test/design_docs.js b/share/www/script/test/design_docs.js
index f799212..a453be4 100644
--- a/share/www/script/test/design_docs.js
+++ b/share/www/script/test/design_docs.js
@@ -103,7 +103,8 @@ function() {
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_show/circular");
   T(xhr.status == 200);
   TEquals("javascript", JSON.parse(xhr.responseText).language);
-  var etag = xhr.getResponseHeader("etag");
+
+  var prev_view_sig = db.designInfo("_design/test").view_index.signature;
 
   db.bulkSave(makeDocs(1, numDocs + 1));
 
@@ -115,7 +116,7 @@ function() {
   TEquals(false, vinfo.compact_running);
   // test that GET /db/_design/test/_info
   // hasn't triggered an update of the views
-  TEquals(etag, vinfo.signature, 'ddoc sig');
+  TEquals(prev_view_sig, vinfo.signature, 'ddoc sig');
   for (var loop = 0; loop < 2; loop++) {
     T(db.view("test/all_docs_twice", {stale: "ok"}).total_rows == 0);
     T(db.view("test/single_doc", {stale: "ok"}).total_rows == 0);


Do you agree with them?
(you were comparing the etag of _show output with the signature (etag) of the view group)

> GET /db/_design/doc/_info should not trigger an update
> ------------------------------------------------------
>
>                 Key: COUCHDB-858
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-858
>             Project: CouchDB
>          Issue Type: Bug
>         Environment: All
>            Reporter: mikeal
>         Attachments: 0001-Fixes-COUCHDB-858.patch
>
>
> Ran across this in my futon rewrite.
> A call to the info for a ddoc triggers an update in some cases. koco says it's when that
"group is open". 
> This request needs to either not trigger an update or respect stale=ok.

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


Mime
View raw message