changes.js occasionally errors
I've been working on a couchapp aware proxy server for couchdb. After rewriting to use asyncore, it is now passing all of the tests in Futon, except for "config" complains that "config.httpd.port != port" which seems okay to me. One problem I noticed was that occasionally the "changes" test fails with: Exception raised: "timeout : bar-only" I've been able to get the same failure with Futon connected directly to the database, so I'm not too worried there's a problem with the proxy, but it does seem to fail on the proxy more often than without. Is this normal behavior for that test script?
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 8:03 PM, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:59 PM, Jan Lehnardt wrote: > >> that is: if(_doc_ids === undefined || typeof(_doc_ids) !== "list") >> >> // actually typeof(_doc_ids) === "undefined" for the first clause >> >> If you can point me out to me that a defined list could also be >> undefined, I'm happy to accept your wording :) >> > I don't say that . I said that doc_ids could be undefined or not a > list which is wrong. eg. someone didn't fill the body, gave an object, > a string, etc. I'm speaking about the current state of the doc_ids > variable not about what we expect it should be. That's the difference > between 2 sentences. > but anyway. I'm not against the change, just wanted to state that is wasn't what I meant. and I really prefer to be descriptive.
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 7:59 PM, Jan Lehnardt wrote: > that is: if(_doc_ids === undefined || typeof(_doc_ids) !== "list") > > // actually typeof(_doc_ids) === "undefined" for the first clause > > If you can point me out to me that a defined list could also be > undefined, I'm happy to accept your wording :) > I don't say that . I said that doc_ids could be undefined or not a list which is wrong. eg. someone didn't fill the body, gave an object, a string, etc. I'm speaking about the current state of the doc_ids variable not about what we expect it should be. That's the difference between 2 sentences.
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On 16 Nov 2010, at 19:55, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:45 PM, Jan Lehnardt wrote: >> >> On 16 Nov 2010, at 19:36, Benoit Chesneau wrote: >> >>> On Tue, Nov 16, 2010 at 7:28 PM, Benoit Chesneau >>> wrote: On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana wrote: >>> s a list, you are less descriptive. >> > > If it's not defined than it's definitely not a list. Does it make sense? I didn't say that your sentence didn't have sense. But I meant to be more descriptive. Afterall that's the reason you want to use === rather than == in js. >>> >>> To be clear , I prefer to give all reasons why this error happened >>> rather than using a mind shortcut and while I'm on it maybe it could >>> be better if i just give the right reason? The only reason I don't >>> actually is because I wanted to use less code >> >> I don't get it. >> >> You said _doc_ids === undefined || typeof(_doc_ids) != List. > > > no i said if typeof(doc_ids) === "list" I didn't mean to use real JavaScript. You wrote: > `doc_ids` member is undefined or not a > -list."} that is: if(_doc_ids === undefined || typeof(_doc_ids) !== "list") // actually typeof(_doc_ids) === "undefined" for the first clause If you can point me out to me that a defined list could also be undefined, I'm happy to accept your wording :) Cheers Jan --
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 7:45 PM, Jan Lehnardt wrote: > > On 16 Nov 2010, at 19:36, Benoit Chesneau wrote: > >> On Tue, Nov 16, 2010 at 7:28 PM, Benoit Chesneau wrote: >>> On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana >>> wrote: >> s a list, you are less descriptive. > If it's not defined than it's definitely not a list. Does it make sense? >>> I didn't say that your sentence didn't have sense. But I meant to be >>> more descriptive. Afterall that's the reason you want to use === >>> rather than == in js. >>> >> >> To be clear , I prefer to give all reasons why this error happened >> rather than using a mind shortcut and while I'm on it maybe it could >> be better if i just give the right reason? The only reason I don't >> actually is because I wanted to use less code > > I don't get it. > > You said _doc_ids === undefined || typeof(_doc_ids) != List. no i said if typeof(doc_ids) === "list"
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
I don't understand. What do the operators == and === have to do with an error message targeted to the user? Complaining that the doc_ids parameter is not defined as a list, isn't explicit enough? (which means it's undefined, a string, an integer, or whatever) On Tue, Nov 16, 2010 at 6:36 PM, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:28 PM, Benoit Chesneau wrote: >> On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana >> wrote: > s a list, you are less descriptive. >>> >>> If it's not defined than it's definitely not a list. Does it make sense? >> I didn't say that your sentence didn't have sense. But I meant to be >> more descriptive. Afterall that's the reason you want to use === >> rather than == in js. >> > > To be clear , I prefer to give all reasons why this error happened > rather than using a mind shortcut and while I'm on it maybe it could > be better if i just give the right reason? The only reason I don't > actually is because I wanted to use less code > -- Filipe David Manana, fdman...@gmail.com, fdman...@apache.org "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On 16 Nov 2010, at 19:36, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:28 PM, Benoit Chesneau wrote: >> On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana >> wrote: > s a list, you are less descriptive. >>> >>> If it's not defined than it's definitely not a list. Does it make sense? >> I didn't say that your sentence didn't have sense. But I meant to be >> more descriptive. Afterall that's the reason you want to use === >> rather than == in js. >> > > To be clear , I prefer to give all reasons why this error happened > rather than using a mind shortcut and while I'm on it maybe it could > be better if i just give the right reason? The only reason I don't > actually is because I wanted to use less code I don't get it. You said _doc_ids === undefined || typeof(_doc_ids) != List. Which reads _doc_ids must not be undefined or must me a List. Filipe made it _doc_ids must be a List (implying they need to be defined, because if it's a List, it's also defined). I actually think Filipe's version is more clear (no offense :). Cheers Jan --
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 7:28 PM, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana > wrote: s a list, you are less descriptive. >>> >> >> If it's not defined than it's definitely not a list. Does it make sense? > I didn't say that your sentence didn't have sense. But I meant to be > more descriptive. Afterall that's the reason you want to use === > rather than == in js. > To be clear , I prefer to give all reasons why this error happened rather than using a mind shortcut and while I'm on it maybe it could be better if i just give the right reason? The only reason I don't actually is because I wanted to use less code
[jira] Commented: (COUCHDB-947) /_restart API requires "Content-Type: application/json"
[ https://issues.apache.org/jira/browse/COUCHDB-947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932586#action_12932586 ] Benoit Chesneau commented on COUCHDB-947: - I tested if this condition could be overriden using enctype attribute in a form, but it couldn't at least in ff or chrome (dunno for ie) so it make sense to keep it. I think it has been applied to others already. > /_restart API requires "Content-Type: application/json" > --- > > Key: COUCHDB-947 > URL: https://issues.apache.org/jira/browse/COUCHDB-947 > Project: CouchDB > Issue Type: Bug > Components: Database Core >Affects Versions: 1.1, 1.2 > Environment: Mac OS X 10.6.5 >Reporter: Filippo Fadda > Fix For: 1.0.1, 1.1, 1.2 > > > The "/_restart" API requires "Content-Type: application/json" header. This is > not coherent because the API doesn't need parameters to be passed using JSON. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 7:19 PM, Filipe David Manana wrote: > On Tue, Nov 16, 2010 at 6:16 PM, Benoit Chesneau wrote: >> On Tue, Nov 16, 2010 at 7:04 PM, Filipe David Manana >> wrote: >>> what did you meant? >>> >>> On Tue, Nov 16, 2010 at 5:58 PM, Benoit Chesneau >>> wrote: On Tue, Nov 16, 2010 at 6:01 PM, wrote: > filter_docids(_, _) -> > - throw({bad_request, "`doc_ids` member is undefined or not a > - list."}). > + throw({bad_request, "`doc_ids` member must be defined as a list"}). result is the same, but that's definitely not what I meant. >> that's the member was undefined or not a list. I you say that's the >> member must be defined as a list, you are less descriptive. >> > > If it's not defined than it's definitely not a list. Does it make sense? I didn't say that your sentence didn't have sense. But I meant to be more descriptive. Afterall that's the reason you want to use === rather than == in js.
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 6:16 PM, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 7:04 PM, Filipe David Manana > wrote: >> what did you meant? >> >> On Tue, Nov 16, 2010 at 5:58 PM, Benoit Chesneau wrote: >>> On Tue, Nov 16, 2010 at 6:01 PM, wrote: >>> filter_docids(_, _) -> - throw({bad_request, "`doc_ids` member is undefined or not a - list."}). + throw({bad_request, "`doc_ids` member must be defined as a list"}). >>> >>> result is the same, but that's definitely not what I meant. >>> > that's the member was undefined or not a list. I you say that's the > member must be defined as a list, you are less descriptive. > If it's not defined than it's definitely not a list. Does it make sense? -- Filipe David Manana, fdman...@gmail.com, fdman...@apache.org "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 7:04 PM, Filipe David Manana wrote: > what did you meant? > > On Tue, Nov 16, 2010 at 5:58 PM, Benoit Chesneau wrote: >> On Tue, Nov 16, 2010 at 6:01 PM, wrote: >> >>> filter_docids(_, _) -> >>> - throw({bad_request, "`doc_ids` member is undefined or not a >>> - list."}). >>> + throw({bad_request, "`doc_ids` member must be defined as a list"}). >> >> result is the same, but that's definitely not what I meant. >> that's the member was undefined or not a list. I you say that's the member must be defined as a list, you are less descriptive.
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
what did you meant? On Tue, Nov 16, 2010 at 5:58 PM, Benoit Chesneau wrote: > On Tue, Nov 16, 2010 at 6:01 PM, wrote: > >> filter_docids(_, _) -> >> - throw({bad_request, "`doc_ids` member is undefined or not a >> - list."}). >> + throw({bad_request, "`doc_ids` member must be defined as a list"}). > > result is the same, but that's definitely not what I meant. > -- Filipe David Manana, fdman...@gmail.com, fdman...@apache.org "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
Re: svn commit: r1035694 - /couchdb/trunk/src/couchdb/couch_changes.erl
On Tue, Nov 16, 2010 at 6:01 PM, wrote: > filter_docids(_, _) -> > - throw({bad_request, "`doc_ids` member is undefined or not a > - list."}). > + throw({bad_request, "`doc_ids` member must be defined as a list"}). result is the same, but that's definitely not what I meant.
[jira] Commented: (COUCHDB-947) /_restart API requires "Content-Type: application/json"
[ https://issues.apache.org/jira/browse/COUCHDB-947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932532#action_12932532 ] Filippo Fadda commented on COUCHDB-947: --- Good point Jan, I agree. Maybe we should use same approch for the many APIs that actually are using POST method. For example "/_replicate", "/_compact", "/_view_cleanup", etc.: all of them are time consuming processes that we can secure in some way. I think all those functions must use the trick of "Content-Type: application/json", or better, I suggest to use a well defined and documented custom header. I can make a list of all those "special" functions. > /_restart API requires "Content-Type: application/json" > --- > > Key: COUCHDB-947 > URL: https://issues.apache.org/jira/browse/COUCHDB-947 > Project: CouchDB > Issue Type: Bug > Components: Database Core >Affects Versions: 1.1, 1.2 > Environment: Mac OS X 10.6.5 >Reporter: Filippo Fadda > Fix For: 1.0.1, 1.1, 1.2 > > > The "/_restart" API requires "Content-Type: application/json" header. This is > not coherent because the API doesn't need parameters to be passed using JSON. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: [REPORT] CouchDB
On Tue, Nov 16, 2010 at 3:51 AM, Damien Katz wrote: > > Apache CouchDB is a distributed JSON document database with HTTP API. > > About to release maintenance version 1.0.2 as well as a new feature release > 1.1.0. New features include: > - native SSL support, > - many fixes to edge-cases in replication, > - database for persistent replication setups, > - HTTP range request support, > - new, scalable OS process handling, > - native HTTP proxy support for externals, - CouchDB rap song highlighted on the Wall Street Journal. > Major improvements on new replicator by Filipe Manana (development branch). > > Discussions and steps towards integrating Cloudant's BigCouch, a dynamo-style > sharding solution with Apache CouchDB. > > Discussions of integrating with more Erlang-native build systems. > > Classified JIRA issues into "easy for new contributors", "medium" and "hard" > to allow new contributors find easy tickets to work on. > > > [1] http://blogs.wsj.com/venturecapital/2010/11/12/music-video-for-database-start-up-thats-how-couchone-rolls/
[jira] Commented: (COUCHDB-912) Anonymous Access to Design Docs on private DB's
[ https://issues.apache.org/jira/browse/COUCHDB-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932476#action_12932476 ] Dale Harvey commented on COUCHDB-912: - It only allows attachments to design docs, but yeh its not a solution I particularly like a flag on the design doc I would much prefer, Its what I mentioned http://comments.gmane.org/gmane.comp.db.couchdb.user/10681, forgot who pointed me towards implementing it as a config option but I figured I would do it quickly just so I could understand the implications.Hinnerk Haardts point out that with a flag on the design doc you can have seperate login / business logic design docs which would work fine. is reading the database on every request to a design document ok / anyway to cache it nicely? I dont want this particular patch to go in, I just wanted to post it to mark it as a priority because without it private couchapps are very very crippled. > Anonymous Access to Design Docs on private DB's > --- > > Key: COUCHDB-912 > URL: https://issues.apache.org/jira/browse/COUCHDB-912 > Project: CouchDB > Issue Type: New Feature > Components: HTTP Interface >Reporter: Dale Harvey > Attachments: anon.patch > > > Right now people need to go through futon in order to login to couchapps > running on private databases, this is a pretty big limitation on the type of > couchapps that can be built > Propose adding the ability for users to flag the design docs as readable for > anonymous users, could be implemented though an attribute on the design doc? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (COUCHDB-947) /_restart API requires "Content-Type: application/json"
[ https://issues.apache.org/jira/browse/COUCHDB-947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Lehnardt closed COUCHDB-947. Resolution: Not A Problem > /_restart API requires "Content-Type: application/json" > --- > > Key: COUCHDB-947 > URL: https://issues.apache.org/jira/browse/COUCHDB-947 > Project: CouchDB > Issue Type: Bug > Components: Database Core >Affects Versions: 1.1, 1.2 > Environment: Mac OS X 10.6.5 >Reporter: Filippo Fadda > Fix For: 1.1, 1.2, 1.0.1 > > > The "/_restart" API requires "Content-Type: application/json" header. This is > not coherent because the API doesn't need parameters to be passed using JSON. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-946) Calling the "/_restart" API via socket or cURL, sometimes CouchDB restarts before I can get the response headers.
[ https://issues.apache.org/jira/browse/COUCHDB-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932420#action_12932420 ] Jan Lehnardt commented on COUCHDB-946: -- I don't think we can/should do anything about the restart-before the response is back. The bus error warrants more investigation, can you prepare a reproducible script? And can you give us as much information about your system and software versions as you can collect? (compiler, libraries, etc). > Calling the "/_restart" API via socket or cURL, sometimes CouchDB restarts > before I can get the response headers. > - > > Key: COUCHDB-946 > URL: https://issues.apache.org/jira/browse/COUCHDB-946 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface >Affects Versions: 1.1, 1.2 > Environment: Mac OS X 10.6.5 >Reporter: Filippo Fadda > Fix For: 1.0.1, 1.1, 1.2 > > > Calling the "/_restart" API via socket or cURL, sometimes CouchDB restarts > before I can get the response headers. Not always, sometimes. > Additionally, with a restart cycle, calling the API sequentially, sometimes > CouchDB crashes with a "bus error" or "seg fault". > > /_restart > > _ using socket _ > string(6) "200 OK" > array(5) { > ["Server"]=> > string(31) "CouchDB/1.0.1 (Erlang OTP/R14B)" > ["Date"]=> > string(29) "Fri, 12 Nov 2010 04:07:47 GMT" > ["Content-Type"]=> > string(24) "text/plain;charset=utf-8" > ["Content-Length"]=> > string(2) "12" > ["Cache-Control"]=> > string(15) "must-revalidate" > } > > /_restart > > _ using socket _ > Error code: 0 > Message: HTTP Status Code undefined. > > /_restart > > _ using cURL _ > string(6) "200 OK" > array(5) { > ["Server"]=> > string(31) "CouchDB/1.0.1 (Erlang OTP/R14B)" > ["Date"]=> > string(29) "Fri, 12 Nov 2010 04:13:04 GMT" > ["Content-Type"]=> > string(24) "text/plain;charset=utf-8" > ["Content-Length"]=> > string(2) "12" > ["Cache-Control"]=> > string(15) "must-revalidate" > } > > /_restart > > _ using cURL _ > Error code: 0 > Message: Empty reply from server -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-846) Redirect on a failed login attempt
[ https://issues.apache.org/jira/browse/COUCHDB-846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932418#action_12932418 ] Jan Lehnardt commented on COUCHDB-846: -- I like the patch & tests, but it no longer applies to trunk. Can you update the patch? > Redirect on a failed login attempt > -- > > Key: COUCHDB-846 > URL: https://issues.apache.org/jira/browse/COUCHDB-846 > Project: CouchDB > Issue Type: New Feature > Components: HTTP Interface >Affects Versions: 1.0 >Reporter: Matt Cooley >Priority: Minor > Fix For: 1.1 > > Attachments: > 0001-POST-to-_session-now-redirects-to-the-URI-given-in-t.patch > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > On a successful cookie-auth login (POST to _session), CouchDB will redirect > the user to the URI specified in the 'next' query parameter. This is useful > for adding authentication to applications that can't rely on javascript being > enabled on the client. To make this functionality more useful, there should > be a complimentary 'fail' redirect. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[REPORT] CouchDB
Apache CouchDB is a distributed JSON document database with HTTP API. About to release maintenance version 1.0.2 as well as a new feature release 1.1.0. New features include: - native SSL support, - many fixes to edge-cases in replication, - database for persistent replication setups, - HTTP range request support, - new, scalable OS process handling, - native HTTP proxy support for externals, Major improvements on new replicator by Filipe Manana (development branch). Discussions and steps towards integrating Cloudant's BigCouch, a dynamo-style sharding solution with Apache CouchDB. Discussions of integrating with more Erlang-native build systems. Classified JIRA issues into "easy for new contributors", "medium" and "hard" to allow new contributors find easy tickets to work on.