Dear Couchees,
Consider a view on a CouchDB 1.1 private DB which emits: ( doc._id, 1 )
1) call the view with reduce=false&include_docs=true by your browser!
2) update a document (with futon)
3) recall that view 
You will see a cached-inconsistent document included in view results! 
(according to _rev and doc data) with a 304 response!
4) recall that view with CTRL+F5 (forces to 'no-cache' and cleaning 
if-Not-Match)
Now couchdb returns 200 with correct included document version!

The above scenario was not happening in previous CouchDB version and at step 3 
we received latest document versions! 
Also this happens when updated document DOES NOT reflect view (key,value) 
pairs, but when we update an attribute that is emited by a view, Couch returns 
consistent results. (logically since view hash is changed)
This seems an to be an issue with couchdb's Cache Control.

for more details Request/Response headers are included down below:

View GET Request @step 3:


Request Headers
----------------------
Host192.168.128.11:5984
User-AgentMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 
Ubuntu/10.10 (maverick) Firefox/3.6.10
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Languageen-us,en;q=0.5
Accept-Encodinggzip,deflate
Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive115
Connectionkeep-alive
Cookiesession_id=439173cbd2f955017d8282102a9388a0b92a29c2; 
AuthSession=YWRtaW46NEUwQUVCNDE6YGCaYBacZ6PweA1xjFoK1U6FwrI
If-None-Match"AI17SB7U17NIG0SL4BRNABYZB"
Cache-Controlmax-age=0

304
-----
ServerCouchDB/1.1.0 (Erlang OTP/R13B03)
Etag"AI17SB7U17NIG0SL4BRNABYZB"
DateWed, 29 Jun 2011 09:07:46 GMT
Content-Typetext/plain;charset=utf-8
Cache-Controlmust-revalidate



AND View GET Request @step 4:

Request Headers
----------------------
Host192.168.128.11:5984
User-AgentMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 
Ubuntu/10.10 (maverick) Firefox/3.6.10
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Languageen-us,en;q=0.5
Accept-Encodinggzip,deflate
Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive115
Connectionkeep-alive
Cookiesession_id=439173cbd2f955017d8282102a9388a0b92a29c2; 
AuthSession=YWRtaW46NEUwQUVCNDE6YGCaYBacZ6PweA1xjFoK1U6FwrI
Pragmano-cache
Cache-Controlno-cache

200
-----
Transfer-Encodingchunked
ServerCouchDB/1.1.0 (Erlang OTP/R13B03)
Etag"AI17SB7U17NIG0SL4BRNABYZB"
DateWed, 29 Jun 2011 09:09:52 GMT
Content-Typetext/plain;charset=utf-8
Cache-Controlmust-revalidate
 


--Behrad

Reply via email to