[jira] [Updated] (COUCHDB-1445) CouchDB deletes .view files if it can't open them, even if the error is "emfile".

2012-03-18 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1445:
--

Comment: was deleted

(was: @Randall & others: what other conditions like emfile can happen where 
creating the file from scratch is not the right cause of action?)

> CouchDB deletes .view files if it can't open them, even if the error is 
> "emfile".
> -
>
> Key: COUCHDB-1445
> URL: https://issues.apache.org/jira/browse/COUCHDB-1445
> Project: CouchDB
>  Issue Type: Bug
>  Components: JavaScript View Server
>Affects Versions: 1.2
>Reporter: Jan Lehnardt
>Assignee: Randall Leeds
> Fix For: 1.2, 1.1.2
>
>
> Via Stefan Kögl on dev@:
> Another thing I noticed during my tests of CouchDB 1.2.x. I redirected
> live traffic to the instance and after a rather short time, requests
> were failing with the following information in the logs:
> [Sun, 18 Mar 2012 16:39:24 GMT] [error] [<0.27554.2>]
> {error_report,<0.31.0>,
>{<0.27554.2>,std_error,
> [{application,mochiweb},
>  "Accept failed error",
>  "{error,emfile}"]}}
> [Sun, 18 Mar 2012 16:39:24 GMT] [error] [<0.27554.2>]
> {error_report,<0.31.0>,
>  {<0.27554.2>,crash_report,
>   [[{initial_call,
> {mochiweb_acceptor,init,
> ['Argument__1','Argument__2',
>  'Argument__3']}},
> {pid,<0.27554.2>},
> {registered_name,[]},
> {error_info,
> {exit,
> {error,accept_failed},
> [{mochiweb_acceptor,init,3},
>  {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_httpd,couch_secondary_services,
>  couch_server_sup,<0.32.0>]},
> {messages,[]},
> {links,[<0.129.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,running},
> {heap_size,233},
> {stack_size,24},
> {reductions,244}],
>[]]}}
> I think "emfile" means that CouchDB (or mochiweb?) couldn't open any
> more files / connections. I've set the (hard and soft) nofile limit for
> user couchdb to 4096, but didn't raise the ERL_MAX_PORTS accordingly.
> Anyway, as soon as the error occured, CouchDB started writing most of my
> view files from scratch, rendering the instance unusable.
> I'd expect CouchDB to fail more gracefully when the maximum number of
> open files is reached. Is this a bug or expected behaviour?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-188) _bulk_docs fails when deleting and adding a doc with the same id

2012-01-06 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-188:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> _bulk_docs fails when deleting and adding a doc with the same id
> 
>
> Key: COUCHDB-188
> URL: https://issues.apache.org/jira/browse/COUCHDB-188
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 0.9
> Environment: CouchDB revision 730414.
>Reporter: Matt Goodall
>Assignee: Filipe Manana
>Priority: Blocker
> Fix For: 1.3
>
> Attachments: 
> 0001-Allow-doc-delete-and-creation-in-the-same-bulk-updat.patch
>
>
> CouchDB returns a "412 Precondition Failed" when the list of changes sent to 
> _bulk_docs deletes a document and later creates a document with the same id 
> as the deleted document:
> {"docs": [
> {"_id": "docid", "_rev": "", "_deleted": true},
> {"_id": "docid"}
> ]}
> Once fixed, the response JSON document  will return the same docid twice in 
> the list but it's presumably ordered consistently with the request data so 
> any client should be able to understand the response.
> Demonstrating the problem using curl is easy enough:
> $ curl -X PUT http://localhost:5984/test
> {"ok":true}
> $ curl -X PUT -d "{}" http://localhost:5984/test/docid
> {"ok":true,"id":"docid","rev":"4140747751"}
> $ curl -X POST -d '{"docs": [{"_id": "docid", "_rev": "4140747751", 
> "_deleted": true}, {"_id": "docid"}]}' http://localhost:5984/test/_bulk_docs
> {"error":"conflict","reason":"Document update conflict."}
> Note: this is likely related to COUCHDB-172.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-438) Add per database (OAuth) authentication to couchdb

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-438:
-

Fix Version/s: (was: 1.2)

Remove FixVersion

> Add per database (OAuth) authentication to couchdb
> --
>
> Key: COUCHDB-438
> URL: https://issues.apache.org/jira/browse/COUCHDB-438
> Project: CouchDB
>  Issue Type: New Feature
>Affects Versions: 0.10
>Reporter: eric casteleijn
>Assignee: Jason Davies
>Priority: Blocker
>
> In set-ups where a couchdb node holds databases for many different users that 
> are not allowed to see each other's data, it is vital that it is possible to 
> give users separate roles for each database. 
> It would be best if adding new users, and assigning roles to users for 
> specific databases could be done through the http interface, as modifying 
> .ini files becomes unwieldy for large numbers of users.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1046) support load of external erlang modules in couchdb.

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1046:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> support load of external erlang modules in couchdb. 
> 
>
> Key: COUCHDB-1046
> URL: https://issues.apache.org/jira/browse/COUCHDB-1046
> Project: CouchDB
>  Issue Type: New Feature
>  Components: Database Core
>Reporter: Benoit Chesneau
> Fix For: 1.3
>
> Attachments: couchdb-plugins-003.patch, couchdb-plugins-004.patch, 
> couchdb-plugins-005.patch, couchdb-plugins-01.patch, couchdb-plugins-02.patch
>
>
> If you want to add external modules in CouchDB and load them , you need to 
> set the ERL_FLAGS environnement variable to the path of a module. 
> The attached patch allows couchdb to load plugins from plugin key in couchdb 
> section. It add needed path to the code path, so the vm can find modules.
> ex:
>[couchdb]
>plugins = plugin1, plugin2
>  Each plugin can have its own section where it set the binaries patch, 
> eventually if a service need to be added to the supervision you can set the 
> module and function to load like in daemon section and tel if it's a 
> supervisor or simple service.
> It also allows couchdb to load a plugin service (gen_server or such) to the 
> supervision. You can choose if the service is a simple daemon or a supervisor.
>  ex:
>[plugin1]
>code_path = /path/to/plugin1/ebin
>daemon = {module, function, [Args]}
>supervisor = false
> Let me know what you think about it. This patch is really useful here and 
> allows me to dynamically load modules I want. Also it eases the integration 
> of external module. For ex I can load my couchapp_ng modules with this lines 
> in local.ini : 
> [couchdb]
> plugins = couchapp-ng
> [couchapp-ng]
> code_path=/Users/benoitc/work/couchapp_ng/ebin
> daemon = {couchapp_ng_routes, start_link, []}
> [httpd_design_handlers]
> _app = {couchapp_ng_httpd, handle_app_req}
> [couchapp_ng_handlers]
> rewrite = {couchapp_ng_handlers, rewrite_handler}
> proxy = {couchapp_ng_handlers, proxy_handler}
> and can do the same with geocouch etc. Tested here with these modules.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-508) handle deleted db event for db

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-508:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> handle deleted db event for db
> --
>
> Key: COUCHDB-508
> URL: https://issues.apache.org/jira/browse/COUCHDB-508
> Project: CouchDB
>  Issue Type: Bug
>Affects Versions: 0.10, 0.11
>Reporter: Benoit Chesneau
> Fix For: 1.3
>
> Attachments: fix_changes.patch
>
>
> Currently when a db is deleted and someone is listenning on _changes feed 
> (continuous or longpoll), couchdb don't close the connection (sending last 
> chunk) and instead send an error status. This patch fix this and ad 
> db_deleted:true  on the last line. Spotted by kocolosk on irc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-680) Security on CouchDB set via Futon does not persist after server restart

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-680:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Security on CouchDB set via Futon does not persist after server restart
> ---
>
> Key: COUCHDB-680
> URL: https://issues.apache.org/jira/browse/COUCHDB-680
> Project: CouchDB
>  Issue Type: Bug
>Affects Versions: 0.10.1
> Environment: CouchDB 0.11.0b915670 on windowsXP
>Reporter: Phat Loc
>  Labels: CouchDB, Futon, Security
> Fix For: 1.3
>
>
> I can set the security on a database via Futon. However a server reboot wipes 
> out the setting.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1313) Support JSONP in externals

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1313:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Support JSONP in externals
> --
>
> Key: COUCHDB-1313
> URL: https://issues.apache.org/jira/browse/COUCHDB-1313
> Project: CouchDB
>  Issue Type: New Feature
>Reporter: Robert Newson
>Assignee: Robert Newson
> Fix For: 1.3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1183) Shouldn't coffee-script.js be available in non-compressed form ?

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1183:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Shouldn't coffee-script.js be available in non-compressed form ?
> 
>
> Key: COUCHDB-1183
> URL: https://issues.apache.org/jira/browse/COUCHDB-1183
> Project: CouchDB
>  Issue Type: Question
>Reporter: Benoit Chesneau
> Fix For: 1.3
>
>
> actually coffee-script.js is provided in its compressed form in share/server. 
> While the compression may be needed this is the only file provided like this. 
> Also I think it's better to provide all sources from which CouchDB depends 
> (and it may be an Apache concern too) so we don't rely on any third party to 
> get full sources. 
> What I propose is to make it available uncompressed, and at build compress 
> it. While we are here we could probably do that for other too. Other solution 
> may be to provide both format (compressed and uncompressed) in the archive 
> and sources. Thoughts?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-410) JavaScript errors in validate_doc_update should be handled more gracefully

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-410:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> JavaScript errors in validate_doc_update should be handled more gracefully
> --
>
> Key: COUCHDB-410
> URL: https://issues.apache.org/jira/browse/COUCHDB-410
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 0.9.1, 0.10
>Reporter: Jason Davies
> Fix For: 1.3
>
> Attachments: util.js.diff
>
>
> For example, if I create validate_doc_update:
> function (oldDoc, newDoc, userCtx) {
>   doc.foo;
> }
> I am greeted by an "OS process timed out" message.  In the logs, all I see is:
> OS Process :: Error converting object to JSON: TypeError: {Array:function (v) 
> {var buf = [];for (var i = 0; i < v.length; i++) 
> {buf.push(toJSON(v[i]));}return "[" + buf.join(",") + "]";}, Boolean:function 
> (v) {return v.toString();}, Date:function (v) {var f = function (n) {return n 
> < 10 ? "0" + n : n;};return "\"" + v.getUTCFullYear() + "-" + 
> f(v.getUTCMonth() + 1) + "-" + f(v.getUTCDate()) + "T" + f(v.getUTCHours()) + 
> ":" + f(v.getUTCMinutes()) + ":" + f(v.getUTCSeconds()) + "Z\"";}, 
> Number:function (v) {return isFinite(v) ? v.toString() : "null";}, 
> Object:function (v) {if (v === null) {return "null";}var buf = [];for (var k 
> in v) {if (!v.hasOwnProperty(k) || typeof k !== "string" || v[k] === 
> undefined) {continue;}buf.push(toJSON(k, val) + ": " + toJSON(v[k]));}return 
> "{" + buf.join(",") + "}";}, String:function (v) {if 
> (/["\\\x00-\x1f]/.test(v)) {v = v.replace(/([\x00-\x1f\\"])/g, function (a, 
> b) {var c = subs[b];if (c) {return c;}c = b.charCodeAt();return "\\u00" + 
> Math.floor(c / 16).toString(16) + (c % 16).toString(16);});}return "\"" + v + 
> "\"";}}[val != null ? val.constructor.name : "Object"] is not a function
> When really the problem is a ReferenceError (I should have used newDoc.foo or 
> oldDoc.foo).  The attached patch modifies toJSON() in utils.js so that it 
> converts anything that isn't a String, Array, Date, Object etc. into a 
> String.  This makes the error appear in the popup in Futon when saving.
> This isn't necessarily the best thing to do as it modifies the semantics of 
> toJSON(), and also we might want to keep the exception info in the logs, and 
> not propagate it to the user.  Perhaps it would be better to modify 
> respond(obj) to produce a better error message in the logs (simply adding 
> something that tried to log obj.toString() would suffice).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-582) _changes filter missing updates

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-582:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> _changes filter missing updates
> ---
>
> Key: COUCHDB-582
> URL: https://issues.apache.org/jira/browse/COUCHDB-582
> Project: CouchDB
>  Issue Type: Bug
>  Components: JavaScript View Server
>Reporter: Chris Anderson
>Assignee: Chris Anderson
> Fix For: 1.3
>
> Attachments: bug582.py
>
>
> reported on the user mailing list: 
> http://mail-archives.apache.org/mod_mbox/couchdb-user/200911.mbox/%3c4b10bd2c.5070...@rogerbinns.com%3e
> I know there is work to be done on the filter mechanism (specifically around 
> process reuse and concurrency)
> The current implementation requires a process per connected user. This should 
> be not that hard to patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-942) CouchDB build fails without eunit

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-942:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> CouchDB build fails without eunit
> -
>
> Key: COUCHDB-942
> URL: https://issues.apache.org/jira/browse/COUCHDB-942
> Project: CouchDB
>  Issue Type: Bug
>  Components: Build System
>Affects Versions: 1.1
>Reporter: Robert Newson
>Assignee: Robert Newson
> Fix For: 1.3
>
> Attachments: 0001-make-eunit-completely-optional.patch
>
>
> A recent upgrade to mochiweb introduced a dependency on eunit but the build 
> tools were not updated to match (mea culpa)
> This ticket includes a patch to mochiweb to make eunit completely optional 
> (and declines to take the option). The patch has been submitted upstream 
> (https://github.com/mochi/mochiweb/pull/22)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1060) CouchDB should use a secure password hash method instead of the current one

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1060:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> CouchDB should use a secure password hash method instead of the current one
> ---
>
> Key: COUCHDB-1060
> URL: https://issues.apache.org/jira/browse/COUCHDB-1060
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Affects Versions: 1.0.2
>Reporter: Nuutti Kotivuori
>Assignee: Robert Newson
>Priority: Minor
> Fix For: 1.3
>
> Attachments: 0001-Integrate-PBKDF2.patch, pbkdf2.erl, pbkdf2.erl
>
>
> CouchDB passwords are stored in a salted, hashed format of a 128-bit salt 
> combined with the password under SHA-1. This method thwarts rainbow table 
> attacks, but is utterly ineffective against any dictionary attacks as 
> computing SHA-1 is very fast indeed.
> If passwords are to be stored in a non-plaintext equivalent format, the hash 
> function needs to be a "slow" hash function. Suitable candidates for this 
> could be bcrypt, scrypt and PBKDF2. Of the choices, only PBKDF2 is really 
> widely used, standardized and goverment approved. (Note: don't be fooled that 
> the PBKDF2 is a "key derivation" function - in this case, it is exactly the 
> same thing as a slow password hash.)
> http://en.wikipedia.org/wiki/PBKDF2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-901) refactor os process management

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-901:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> refactor os process management
> --
>
> Key: COUCHDB-901
> URL: https://issues.apache.org/jira/browse/COUCHDB-901
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Affects Versions: 1.0.1
>Reporter: Adam Kocoloski
> Fix For: 1.3
>
>
> Wanted to make sure this doesn't get forgotten in the planning for 1.1.  Paul 
> Davis and I independently refactored couch_query_servers.  Paul's work is 
> much more comprehensive and includes a switch to emonk:
> http://github.com/davisp/couchdb/tree/emonk
> The work I did is here
> http://github.com/kocolosk/couchdb/tree/COUCHDB-901
> One feature not included in that branch is the ability to limit the number of 
> OS processes.  Should be simple to add if my work ends up being merged.  I 
> did the refactor because I was having problems with couch_query_servers 
> "forgetting" about OS processes in BigCouch.  One of the ets tables held by 
> couch_query_servers would list thousands of processes (and in fact there were 
> thousands of spawned couchjs), but another table would claim that only two 
> were running.  After digging through the code a while I became frustrated 
> with all of the tracking of multiple ets tables and rewrote a server that 
> used only one table.  Other changes include
> * ability to reuse an OS process when the client that requested it dies.
> * better behavior under config changes - doesn't kill all query servers when 
> [query_servers] or [native_query_servers] block changes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-431) Support cross domain XMLHttpRequest (XHR) calls by implementing Access Control spec

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-431:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Support cross domain XMLHttpRequest (XHR) calls by implementing Access 
> Control spec
> ---
>
> Key: COUCHDB-431
> URL: https://issues.apache.org/jira/browse/COUCHDB-431
> Project: CouchDB
>  Issue Type: New Feature
>  Components: HTTP Interface
>Affects Versions: 0.9
>Reporter: James Burke
>Assignee: Benoit Chesneau
>Priority: Minor
> Fix For: 1.3
>
> Attachments: 0001-cors-support.-should-fix-COUCHDB-431-2.patch, 
> 0001-cors-support.-should-fix-COUCHDB-431.patch, 
> 0001-cors-support.-should-fix-COUCHDB-431.patch, 
> 0001-cors-support.-should-fix-COUCHDB-431.patch, 
> 0001-cors-support.-should-fix-COUCHDB-431.patch, 
> A_0001-Generalize-computing-the-appropriate-headers-for-any.patch, 
> A_0002-Send-server-headers-for-externals-responses.patch, 
> A_0003-Usably-correct-w3c-CORS-headers-for-valid-requests.patch, 
> A_0004-Respond-to-CORS-preflight-checks-HTTP-OPTIONS.patch, cors.html, 
> cors_test.html, test_cors2-1.tgz, test_cors2.tgz
>
>
> Historically, browsers have been restricted to making XMLHttpRequests (XHRs) 
> to the same origin (domain) as the web page making the request. However, the 
> latest browsers now support cross-domain requests by implementing the Access 
> Control spec from the W3C:
> http://dev.w3.org/2006/waf/access-control/
> In order to keep older servers safe that assume browsers only do same-domain 
> requests, the Access Control spec requires the server to opt-in to allow 
> cross domain requests by the use of special HTTP headers and supporting some 
> "pre-flight" HTTP calls.
> Why should CouchDB support this: in larger, high traffic site, it is common 
> to serve the static UI files from a separate, differently scaled server 
> complex than the data access/API server layer. Also, there are some API 
> services that are meant to be centrally hosted, but allow API consumers to 
> use the API from different domains. In these cases, the UI in the browser 
> would need to do cross domain requests to access CouchDB servers that act as 
> the API/data access server layer.
> JSONP is not enough in these cases since it is limited to GET requests, so no 
> POSTing or PUTing of documents.
> Some information from Firefox's perspective (functionality available as of 
> Firefox 3.5):
> https://developer.mozilla.org/en/HTTP_access_control
> And information on Safari/Webkit (functionality in latest WebKit and Safari 
> 4):
> http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Articles/XHR.html
> IE 8 also uses the Access Control spec, but the requests have to go through 
> their XDomainRequest object (XDR):
> http://msdn.microsoft.com/en-us/library/cc288060%28VS.85%29.aspx
> and I thought IE8 only allowed GET or POST requests through their XDR.
> But as far as CouchDB is concerned, implementing the Access Control headers 
> should be enough, and hopefully IE 9 will allow normal xdomain requests via 
> XHR.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1344) add etap coverage for _changes with filters and since

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1344:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> add etap coverage for _changes with filters and since
> -
>
> Key: COUCHDB-1344
> URL: https://issues.apache.org/jira/browse/COUCHDB-1344
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Affects Versions: 1.2
>Reporter: Randall Leeds
>Assignee: Randall Leeds
>Priority: Minor
> Fix For: 1.3
>
>
> I described a problem with the js tests for _changes after new filtering 
> stuff:
>   > It was the "andmore-only" section near the end:
>   > T(line.seq == 8)
>   > T(line.id == "andmore")
>   > The problem is that seq _should_ be strictly greater than since.
>   > If you look at couch_db:changes_since/5 and related functions, that
>   > module adds one to the sequence number in order to get this behavior.
>   > Only when using filters was this broken and became >=.
> Filipe said:
>   > I've never had such failure locally. If it's due to browser caching,
>   > it would be a good idea to add a test to test/etap/073-changes.t
> I said I'd add an etap test. This ticket is to remind me to do it:
>   > I can add an etap test. I'm positive it's not browser caching because
>   > I identified and fixed it. Also, because I just committed a change to
>   > improve Futon's browser caching :).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1304) set Expires header on session cookies to make them persistent

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1304:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> set Expires header on session cookies to make them persistent
> -
>
> Key: COUCHDB-1304
> URL: https://issues.apache.org/jira/browse/COUCHDB-1304
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Affects Versions: 1.1
>Reporter: max ogden
>Priority: Minor
>  Labels: authentication, cookie
> Fix For: 1.3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> currently couch's cookie based authentication only sets session cookies as 
> opposed to persistent cookies. the difference between these two is the 
> Expires header. if it is not present most web browsers will delete your 
> cookie when you quit your browser, whereas if it is set then your browser 
> keeps the cookie around until the time specified by the Expires header.
> This sucks for UX because users quit and re-launch their browser they'll have 
> to log in again. 
> I am proposing that we set the Expires header in cookies to match the time in 
> the couch_httpd_auth timeout
> p.s. this is similar to the issue I opened 
> https://issues.apache.org/jira/browse/COUCHDB-1095 but at that time I didn't 
> realize that what I really wanted was the Expires header

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1143) Improve query_server_config section

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1143:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Improve query_server_config section
> ---
>
> Key: COUCHDB-1143
> URL: https://issues.apache.org/jira/browse/COUCHDB-1143
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Infrastructure, JavaScript View Server
>Reporter: Alexander Shorin
>Priority: Minor
>  Labels: features
> Fix For: 1.3
>
>
> Situation:
> CouchDB query_server_config tells us that it holds all query server 
> configuration and at least js query server approves this by 
> State.query_config object.
> However, there couldn't be defined any options except of reduce_size and 
> os_timeout - others are just ignored.
> Idea:
> Allow to pass all options setted within query_server_config section to query 
> server!
> But, because one CouchDB server could have a lot of query servers, that may 
> have different and similar options in same time, placing all of them within 
> query_server_config set is not rational.
> So they could to be splitted to shared and specific ones:
> query_server_config
> ---> python_server_config
> ---> javascript_server_config
> ---> clojure_server_config
> ---> {server_name}_server_config
> Where {server_name} is same as key in query_servers option set. So there 
> could be a some kind standard of query server configuration that could be 
> easily extended or overrides by local query server configuration.
> Reasons why it could be useful:
> - Flexible customization of query server. 
> Better if CouchDB server restart wouldn't be required (that's could be done 
> via reset command). Current solution with command line query server arguments 
> requires of it and that's not good.
> - Each query server could have own configuration. There could be 
> debug/production query server sets for easily analyzing any problems or other 
> things.
> - Higher customization gives access to very very sweet things.
> For what it could be used?
> - Allow GET requests for _update functions without query server code change
> - Control log level and logging sources and destinations
> - Control query server language specific things such as json module, 
> optimizations.
> - If someday maps would work in async mode, there also could be defined how 
> many workers qs must have spawned.
> - Self monitoring for memory consuming and idle time to have suicide with cry 
> in logs
> Usage of this feature is limited only by query server developer fantasy.
> How to implement this?
> I suppose, that for this sections value field should be tracked as json 
> encoded value (not object or list required, just valid value) so this trick 
> should remove type guessing hell, just check if value is correct json one and 
> leave it processing for query server.
> However, while I've wrote this issue text, I've realized some flaws of this 
> feature.
> Reasons why it just wasting of time and should not being implemented:
> - Complex configurations makes relax time lesser.
> - Poorly couchapp portability due to specific server configuration and 
> debuging hell due to invalid of it.
> - Not all query servers would be use it - suddenly, a most part of them have 
> stopped at point of 0.8.0 release.
> - Not all query servers are really needs in them due to various reasons.
> - Not all couchapps would use all this customizations in full power. Only 
> news one and only may be.
> That's all my thoughts(: A little strange to finish issue description on 
> WONTFIX note, but may be I'm wrong about those reasons. Have someone more 
> thoughts about subject?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-608) 404 on missing view *before* trying to re-index the ddoc

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-608:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> 404 on missing view *before* trying to re-index the ddoc
> 
>
> Key: COUCHDB-608
> URL: https://issues.apache.org/jira/browse/COUCHDB-608
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Affects Versions: 0.10.1
>Reporter: Dirkjan Ochtman
>Priority: Minor
> Fix For: 1.3
>
>
> Apparently a 404 error ('not_found', 'missing_named_view') will currently 
> only be thrown after indexing of the design doc has been completed. It would 
> be nice if it could check if the view exists first. Fail fast!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-792) Bespin integrated in Futon views editor

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-792:
-

Fix Version/s: (was: 1.2)

Remove FixVersion

> Bespin integrated in Futon views editor
> ---
>
> Key: COUCHDB-792
> URL: https://issues.apache.org/jira/browse/COUCHDB-792
> Project: CouchDB
>  Issue Type: New Feature
>  Components: Futon
> Environment: HTML5 / Javascript
>Reporter: Mickael Bailly
>Priority: Minor
>  Labels: bespin, editor, futon
> Attachments: futon-bespin.patch.gz
>
>
> Here is the "less-intrusive-I-can" patch to enable bespin editor in Futon 
> database views page.
> Implementation constraints :
> - bespin can't have multiple instances
> - bespin can't be enabled=>disabled=>enabled
> I also met a bug on Google Chrome because CouchDB doesn't set a charset in 
> HTTP response headers for database.html ... As a result I only succeded with 
> BespinEmbedded 0.7.1.
> Implementation details :
> - created proxy functions to get and set map/reduce code to/from editor ( 
> instead of $("#viewcode_map").val() ... )
> - created bespin wrapper class

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1063) Update m4 macros

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1063:
--

Fix Version/s: (was: 1.2)
   1.0.4

Bump to 1.3.x.

> Update m4 macros
> 
>
> Key: COUCHDB-1063
> URL: https://issues.apache.org/jira/browse/COUCHDB-1063
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 1.0.2
> Environment: Any
>Reporter: Jan Lehnardt
>Assignee: Noah Slater
>Priority: Minor
> Fix For: 1.0.4
>
>
> There are newer versions of the m4 macros we are using. See 
> http://www.gnu.org/software/autoconf-archive/ax_lib_curl.html#ax_lib_curl and 
> http://www.gnu.org/software/autoconf-archive/ax_check_icu.html for details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-621) configure script doesn't allow overriding localdocdir

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-621:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> configure script doesn't allow overriding localdocdir
> -
>
> Key: COUCHDB-621
> URL: https://issues.apache.org/jira/browse/COUCHDB-621
> Project: CouchDB
>  Issue Type: Bug
>  Components: Build System
>Affects Versions: 0.10.1
> Environment: Gentoo Linux
>Reporter: Dirkjan Ochtman
>Assignee: Noah Slater
>Priority: Minor
> Fix For: 1.3
>
>
>  * econf: updating apache-couchdb-0.10.1/build-aux/config.guess with 
> /usr/share/gnuconfig/config.guess
>  * econf: updating apache-couchdb-0.10.1/build-aux/config.sub with 
> /usr/share/gnuconfig/config.sub
> ./configure --prefix=/usr --build=x86_64-pc-linux-gnu 
> --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info 
> --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib 
> --libdir=/usr/lib64 --with-erlang=/usr/lib/erlang/usr/include 
> --localstatedir=/var --localdocdir=/usr/share/doc/couchdb-0.10.1
> configure: error: unrecognized option: 
> `--localdocdir=/usr/share/doc/couchdb-0.10.1'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-323) add support to jquery.couch.js for 'keys' param to all_docs view

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-323:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> add support to jquery.couch.js for 'keys' param to all_docs view
> 
>
> Key: COUCHDB-323
> URL: https://issues.apache.org/jira/browse/COUCHDB-323
> Project: CouchDB
>  Issue Type: Improvement
>Reporter: Mark Hammond
>Assignee: Mark Hammond
>Priority: Minor
> Fix For: 1.3
>
> Attachments: jquery_view_keys.patch
>
>
> jquery.couch.js currently doesn't allow you to execute a query via a POST 
> passing keys in the request body.  I'm attaching a patch which adds support 
> for this.  It also changes the error message when hitting a view to include 
> the name of the view - it seemed worthwhile to keep in the patch, but 
> obviously isn't required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-268) _design/ resource to make Futon view lists faster

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-268:
-

Fix Version/s: (was: 1.2)

Remove FixVersion

> _design/ resource to make Futon view lists faster
> -
>
> Key: COUCHDB-268
> URL: https://issues.apache.org/jira/browse/COUCHDB-268
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Reporter: Chris Anderson
>Assignee: Chris Anderson
>Priority: Minor
>
> I think we can do this in one http request per database. (A temp view could 
> work but would require significant processing overhead...). The simplest 
> thing is probably to implement a _design resource.
> this will make Futon database browsing much faster because it won't have to 
> load (potentially large) design docs to see which views are available.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-882) Nonstandard HTTP methods not converted to JSON correctly

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-882:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Nonstandard HTTP methods not converted to JSON correctly
> 
>
> Key: COUCHDB-882
> URL: https://issues.apache.org/jira/browse/COUCHDB-882
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 1.0.1
> Environment: Erlang R13, Linux
>Reporter: Jason Smith
>Priority: Minor
> Fix For: 1.3
>
> Attachments: 
> 0001-For-unknown-HTTP-methods-Use-a-binary-for-httpd.meth.patch, 
> 0001-For-unknown-HTTP-methods-Use-a-binary-for-httpd.meth.patch
>
>
> Since COUCHDB-815, CouchDB allows nonstandard or unknown HTTP methods in case 
> a _show or similar function may want to implement a response to that method.
> Unfortunately the (my) patch in that ticket used couch_util:to_existing_atom 
> which returns the passed value unmodified if it has no corresponding atom. 
> That is wrong because the HTTP method will be copied into the `req` object in 
> the view server, therefore it must not be an Erlang string (list of integers) 
> because those do not JSONify correctly. Instead, if the atom does not exist, 
> the method should be converted to a binary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-358) make install not creating {$prefix}/var/run/couchdb on RHEL5/OSX

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-358:
-

Fix Version/s: (was: 1.2)

Remove FixVersion

> make install not creating {$prefix}/var/run/couchdb on RHEL5/OSX
> 
>
> Key: COUCHDB-358
> URL: https://issues.apache.org/jira/browse/COUCHDB-358
> Project: CouchDB
>  Issue Type: Bug
>  Components: Build System
>Affects Versions: 0.10
> Environment: RHEL5 / OSX
>Reporter: Sho Fukamachi
>Priority: Minor
>
> Installing CouchDB from trunk on RHEL5 (and OSX) failed to create the 
> {$prefix}/var/run/couchdb dir, necessitating manual creation and chown'ing. 
> This directory is needed when running in background.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1053) missing_named_view for reduce fxns that compile but throw runtime errors

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1053:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> missing_named_view for reduce fxns that compile but throw runtime errors
> 
>
> Key: COUCHDB-1053
> URL: https://issues.apache.org/jira/browse/COUCHDB-1053
> Project: CouchDB
>  Issue Type: Bug
>  Components: JavaScript View Server
> Environment: OSX, prebuilt
>Reporter: Ryan Richt
>Priority: Trivial
> Fix For: 1.3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Attempting to query a map-only view with reduce=false yields the same error 
> message as (1) a view that is undefined and (2) a view that has a defined, 
> compile-time valid, but run-time invalid reduce function. So if your reduce 
> function throws a TypeError, you get this cryptic error (cryptic b/c so many 
> problems yield the same error) instead of an error to that effect. Errors do 
> show up in the log, and this is what the view gives:
> {"error":"not_found","reason":"missing_named_view"}
> Might be fixed in 1.0.2 but I cant use the built-in updater anymore after 
> corporate firewall changes!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-308) Server-level index page should provide pointers to other available resources

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-308:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Server-level index page should provide pointers to other available resources
> 
>
> Key: COUCHDB-308
> URL: https://issues.apache.org/jira/browse/COUCHDB-308
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Affects Versions: 0.9
>Reporter: Dirkjan Ochtman
>Priority: Trivial
> Fix For: 1.3
>
> Attachments: server-links.diff
>
>
> It would be nice if the HTTP interface made it easy to find other relevant 
> resources (i.e. don't require the API user to know the endpoints beforehand).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-317) Badmatch error if _replicate target starts with slash

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-317:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Badmatch error if _replicate target starts with slash
> -
>
> Key: COUCHDB-317
> URL: https://issues.apache.org/jira/browse/COUCHDB-317
> Project: CouchDB
>  Issue Type: Bug
>  Components: Replication
>Affects Versions: 0.9.1
> Environment: svn r761188
>Reporter: Brian Candler
>Priority: Trivial
> Fix For: 1.3
>
>
> Giving a replication source or target which starts with a slash gives an 
> Erlang barf error. (The wiki at http://wiki.apache.org/couchdb/Replication 
> said that this slash was necessary. I will fix the wiki, but the error is 
> still unsightly)
> $ curl -X POST -d '{"source":"/foo","target":"/bar"}' 
> http://127.0.0.1:5984/_replicate
> {"error":"case_clause","reason":"{error,{{{badmatch,{error,illegal_database_name}},\n
>  [{couch_rep,init,1},\n  {gen_server,init_it,6},\n  
> {proc_lib,init_p,5}]},\n
> {child,undefined,\"7898c2bfbbcf8adbb305371e6c3c949e\",\n   
> {gen_server,start_link,\n   [couch_rep,\n 
>[\"7898c2bfbbcf8adbb305371e6c3c949e\",\n   
>   {local,<<\"/foo\">>,{user_ctx,null,[<<\"_admin\">>]}},\n
>  {local,<<\"/bar\">>,\n
> {user_ctx,null,[<<\"_admin\">>]}}],\n[]]},\n  
>  transient,1,worker,\n   [couch_rep]}}}"}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1181) Provide a lean Windows makefile target by removing erlang cruft

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1181:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Provide a lean Windows makefile target by removing erlang cruft
> ---
>
> Key: COUCHDB-1181
> URL: https://issues.apache.org/jira/browse/COUCHDB-1181
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Build System
> Environment: Windows
>Reporter: Dave Cottlehuber
>Priority: Trivial
>  Labels: windows
> Fix For: 1.3
>
> Attachments: slim_couch.cmd
>
>
> We should be able to get the build to 1/3 of current size. Thanks to @wohali 
> via IRC, and @daleharvey with android build 
> https://github.com/daleharvey/build-android-couch/blob/master/build.final#L31
> The three major contributors to the 50+MB download & 120+MB windows installed 
> footprint are:
> 1. including all of OTP when a small portion is required to run CouchDB
> 2. including all obj, src, include, examples components of required OTP 
> libraries
> 3. unneeded vc redist runtimes due to different build toolchains.
> Manual steps follow; I will work on extending build system later.
> 1. remove unneeded OTP libraries/apps
> - remove all but following from $COUCH_TOP/lib
> couch-*
> crypto-*
> debugger-*
> erlang-oauth*
> erts-*
> etap*
> ibrowse-*
> inets-*
> kernel-*
> mochiweb-*
> public_key-*
> reltool-*
> runtime_tools-*
> sasl-*
> ssl-*
> stdlib-*
> xmerl-*
> from %COUCH% do:
> cd lib
> mkdir ..\stash ..\trash
> for /d %i in (couch-* crypto-* debugger-* erlang-oauth* erts-* etap* 
> ibrowse-* inets-* kernel-* mochiweb-* public_key-* reltool-* runtime_tools-* 
> sasl-* ssl-* stdlib-* xmerl-*) do @echo %i && move "%i" ..\stash\
> for /d %i in (*) do @move "%i" ..\trash\
> for /d %i in  (..\stash\*) do @move "%i"
> :: if you are brave rd /s/q ..\stash ..\trash
> 2. from %COUCH% run this:
> cd erts* && rd /s/q include lib src

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-259) Ability to store abitrary data in attachment stubs

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-259:
-

Fix Version/s: (was: 1.2)

Remove FixVersion.

> Ability to store abitrary data in attachment stubs
> --
>
> Key: COUCHDB-259
> URL: https://issues.apache.org/jira/browse/COUCHDB-259
> Project: CouchDB
>  Issue Type: Wish
>  Components: Database Core
>Affects Versions: 0.8.1
>Reporter: Sho Fukamachi
>Priority: Minor
>
> I suggest the ability to store arbitrary data in line with single attachments 
> to a doc. The mooted use is to store metadata about that attachment.
> For example, a current attachment:
> m['_attachments']
> => {"yamanote.jpg"=>{"content_type"=>"image/jpeg", "stub"=>true, 
> "length"=>382613}}
> Desired behaviour is to be able to insert persistent metadata like so:
> m['_attachments']
> => {"yamanote.jpg"=>{"content_type"=>"image/jpeg", "stub"=>true, 
> "length"=>382613, "width" => 800, "height" => 600, "md5" => 
> "95de7a118ee28824afa8d2ad8fe5819f"}}
> And many other use cases according to media type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-813) No View Server test for error in map function

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-813:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> No View Server test for error in map function
> -
>
> Key: COUCHDB-813
> URL: https://issues.apache.org/jira/browse/COUCHDB-813
> Project: CouchDB
>  Issue Type: Bug
>  Components: Test Suite
>Affects Versions: 0.11
>Reporter: Stephen Prater
>Priority: Minor
> Fix For: 1.3
>
>
> There is no r-spec test for how a view server should behave if an error is 
> thrown in the map function.  The JS server returns empty if map terminates 
> abnormally so, I've codified that behavior in an rspec test.
>   it "should return empty if map terminates abnormally" do
> @qs.reset!
> @qs.run(["add_fun", functions["error-in-map"]]).should == true
> @qs.run(["add_fun", functions["emit-once"]]).should == true
> rows = @qs.run(["map_doc", {:a => "b"}])
> rows[0].should == []
> rows[1].should == [["baz","b"]]
>   end

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-822) body_too_large error for external processes, when body is 3MB

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-822:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> body_too_large error for external processes, when body is 3MB
> -
>
> Key: COUCHDB-822
> URL: https://issues.apache.org/jira/browse/COUCHDB-822
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 0.11
> Environment: CouchDB 0.11 on Ubuntu 10.04,
>Reporter: Erik Edin
>Assignee: Robert Newson
>Priority: Minor
> Fix For: 1.3
>
>
> I have a photo which is around 3 MB that I'm trying to PUT to an external 
> process on the CouchDB database. The external process is called "_upload".
> I get an uncaught error "{exit,{body_too_large,content_length}}" in the logs 
> when trying this. Smaller photos (around 60 kB) seem to work just fine.
> This just happens with external processes. I can upload the photo as an 
> attachment directly to a document, with no problems.
> The error is similar to an earlier bug in the mochiweb library that was fixed 
> around Feb 2009, where mochiweb never used the "max_document_size" setting 
> that was provided when calling mochiweb_request:recv_body.
> I believe, supported by the stack trace below, that the cause for this bug is 
> that in couch_httpd_external:json_req_obj the function 
> mochiweb_request:recv_body/0 is called, which uses the mochiweb default value 
> on MaxBody, which is 1 MB.
> I think that couch_httpd_external:json_req_obj should call 
> mochiweb_request:recv_body/1 instead, with the "max_document_size" setting as 
> the argument.
> Here are the error logs from one of my attempts:
> [Thu, 08 Jul 2010 18:49:53 GMT] [debug] [<0.3738.0>] 'PUT' 
> /pillowfight/_upload/6b1908c352129ddda396fa69ac003d11 {1,1}
> Headers: [{'Accept',"*/*"},
>   {'Content-Length',"3093976"},
>   {'Content-Type',"image/jpg"},
>   {"Expect","100-continue"},
>   {'Host',"localhost:5984"},
>   {'User-Agent',"curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 
> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"}]
> [Thu, 08 Jul 2010 18:49:53 GMT] [debug] [<0.3738.0>] OAuth Params: []
> [Thu, 08 Jul 2010 18:49:53 GMT] [error] [<0.3738.0>] Uncaught error in HTTP 
> request: {exit,{body_too_large,content_length}}
> [Thu, 08 Jul 2010 18:49:53 GMT] [info] [<0.3738.0>] Stacktrace: 
> [{mochiweb_request,stream_body,5},
>  {mochiweb_request,recv_body,2},
>  {couch_httpd_external,json_req_obj,3},
>  {couch_httpd_external,process_external_req,3},
>  {couch_httpd_db,do_db_req,2},
>  {couch_httpd,handle_request_int,5},
>  {mochiweb_http,headers,5},
>  {proc_lib,init_p_do_apply,3}]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1249) Documentation for view function in jquery.couch.js needs work

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1249:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x.

> Documentation for view function in jquery.couch.js needs work
> -
>
> Key: COUCHDB-1249
> URL: https://issues.apache.org/jira/browse/COUCHDB-1249
> Project: CouchDB
>  Issue Type: Bug
>  Components: JavaScript View Server
>Affects Versions: 1.1
>Reporter: Mike McKay
>Priority: Minor
>  Labels: documentation
> Fix For: 1.3
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> patch here: http://pastie.org/2378357

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-348) / should redirect to a human readable page when accessed from a browser

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-348:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> / should redirect to a human readable page when accessed from a browser
> ---
>
> Key: COUCHDB-348
> URL: https://issues.apache.org/jira/browse/COUCHDB-348
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Reporter: Chris Anderson
> Fix For: 1.3
>
> Attachments: COUCHDB_348_01.patch, COUCHDB_348_02.patch, 
> COUCHDB_348_03.patch, encs.erl
>
>
> As more people are adopting CouchDB, the number of questions along the lines 
> of "All I see is {"couchdb":"Welcome","version":"0.10.0a773399"}, what now?"
> If this page redirected to /_utils/ (or maybe something more user-focussed) 
> when the accept headers included html, we could make the first-time user 
> experience more palatable.
> There's some code in COUCHDB-234 that might be helpful here.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-462) track conflict count in db_info (was built-in conflicts view)

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-462:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> track conflict count in db_info (was built-in conflicts view)
> -
>
> Key: COUCHDB-462
> URL: https://issues.apache.org/jira/browse/COUCHDB-462
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Reporter: Adam Kocoloski
> Fix For: 1.3
>
> Attachments: 462-jan-2.patch, COUCHDB-462-adam-updated.patch, 
> COUCHDB-462-jan.patch, conflicts_in_db_info.diff, conflicts_in_db_info2.diff, 
> conflicts_view.diff, whitespace.diff
>
>
> This patch adds a built-in _conflicts view indexed by document ID that looks 
> like
> GET /dbname/_conflicts
> {"rows":[
> {"id":"foo", "rev":"1-1aa8851c9bb2777e11ba56e0bf768649", 
> "conflicts":["1-bdc15320c0850d4ee90ff43d1d298d5d"]}
> ]}
> GET /dbname/_conflicts?deleted=true
> {"rows":[
> {"id":"bar", "rev":"5-dd31186f5aa11ebd47eb664fb342f1b1", 
> "conflicts":["5-a0efbb1990c961a078dc5308d03b7044"], 
> "deleted_conflicts":["3-bdc15320c0850d4ee90ff43d1d298d5d","2-cce334eeeb02d04870e37dac6d33198a"]},
> {"id":"baz", "rev":"2-eec205a9d413992850a6e32678485900", "deleted":true, 
> "deleted_conflicts":["2-10009b36e28478b213e04e71c1e08beb"]}
> ]}
> As the HTTPd and view layers are a bit outside my specialty I figured I 
> should ask for a Review before Commit.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-472) handle custom CouchdDB welcome page

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-472:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> handle custom CouchdDB welcome page
> ---
>
> Key: COUCHDB-472
> URL: https://issues.apache.org/jira/browse/COUCHDB-472
> Project: CouchDB
>  Issue Type: Improvement
>Affects Versions: 0.10
>Reporter: Benoit Chesneau
>Assignee: Benoit Chesneau
> Fix For: 1.3
>
> Attachments: COUCHDB-472-2.patch, COUCHDB-472.patch, Welcome page 
> screenshot.jpg, couchdb_welcome.patch, couchdb_welcome2.patch, 
> couchdb_welcome3.patch, screenshot.png
>
>
> This change modify behaviour of Welcome handler by allowing admin to 
> customize the welcome page. If content is "application/json" it will send 
> current json object, if not, it will send an html page or redirect to another 
> path.  
> This patch change the confugration string to a tupple {WelcomeMsg, 
> WelcomePage}. WelcomePage could be a string for DocumentRoot where it will 
> find welcome.html page or a tupple {redirect, Url}
> Ex if in config you have:
> / = {couch_httpd_misc_handlers, handle_welcome_req, {<<"Welcome">>, 
> "/usr/local/share/couchdb/www"}}
> If Accept content is application/json Couchdb will send :
> "couchdb":"Welcome","version":"0.10.0a"}
> If other it will send welcome.html.
> if you replace "/usr/local/share/couchdb/www" by {redirect, 
> <<"/_utils">>} user will be redirected on futon.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-597) Replication tasks crash.

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-597:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> Replication tasks crash.
> 
>
> Key: COUCHDB-597
> URL: https://issues.apache.org/jira/browse/COUCHDB-597
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 0.11
>Reporter: Robert Newson
> Fix For: 1.3
>
> Attachments: 0001-Cleanup-597-fixes.patch, 
> 0001-changes-replication-timeouts-and-att.-fixes-COUCHDB-.patch, 
> 597_fixes.patch, couchdb_597.patch
>
>
> If I kick off 10 replication tasks in quick succession, occasionally one or 
> two of the replication tasks will die and not be resumed. It seems that the 
> stat tracking is a little buggy, and under stress can eventually cause a 
> permanent failure of the supervised replication task;
> [Fri, 11 Dec 2009 19:00:08 GMT] [error] [<0.80.0>] {error_report,<0.30.0>,
> {<0.80.0>,supervisor_report,
>  [{supervisor,{local,couch_rep_sup}},
>   {errorContext,shutdown_error},
>   {reason,killed},
>   {offender,
>   [{pid,<0.6700.11>},
>{name,"fcbb13200a1618cf983b347f4d2c9835+create_target"},
>{mfa,
>{gen_server,start_link,
>[couch_rep,
> ["fcbb13200a1618cf983b347f4d2c9835",
>  {[{<<"create_target">>,true},
>{<<"source">>,<<"http://node:5984/perf-p2";>>},
>{<<"target">>,<<"perf-p2">>}]},
>  {user_ctx,null,[<<"_admin">>]}],
> []]}},
>{restart_type,temporary},
>{shutdown,1},
>{child_type,worker}]}]}}
> [Fri, 11 Dec 2009 19:00:08 GMT] [error] [emulator] Error in process 
> <0.6705.11> with exit value: 
> {badarg,[{ets,insert,[stats_hit_table,{{couchdb,open_os_files},-1}]},{couch_stats_collector,decrement,1}]}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-661) _all_dbs should list only the DBs accessible to the user

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-661:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> _all_dbs should list only the DBs accessible to the user
> 
>
> Key: COUCHDB-661
> URL: https://issues.apache.org/jira/browse/COUCHDB-661
> Project: CouchDB
>  Issue Type: Bug
>  Components: HTTP Interface
>Affects Versions: 0.11
> Environment: trunk / 0.11
>Reporter: Filipe Manana
> Fix For: 1.3
>
> Attachments: couchdb-_all_dbs-auth-2.patch, 
> couchdb-_all_dbs-auth.patch
>
>
> As discussed in the auth roadmap mail, sent by Chris to @dev, the _all_dbs 
> URI should only list the DBs that are accessible to the user.
> The following patch is a naive solution. It doesn't scale for CouchDB servers 
> with millions of DBs. Regarding this scaling detail, I'll discuss soon in the 
> @dev mailing list some ideas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-486) Better separation between httpd and core through api layer

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-486:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> Better separation between httpd and core through api layer
> --
>
> Key: COUCHDB-486
> URL: https://issues.apache.org/jira/browse/COUCHDB-486
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Reporter: Adam Kocoloski
> Fix For: 1.3
>
> Attachments: couch_api.patch
>
>
> I'm attaching a patch that routes non-purely-functional calls into core 
> CouchDB modules through a new couch_api module.  I also went ahead and wrote 
> down dialyzer specs for everything in couch_api.  I think this will be a 
> useful reference, will make the codebase a bit more accessible to newcomers, 
> and will help us maintain better separation between the purely functional 
> httpd layer and the core (useful in e.g. partitioning work).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-653) Extensible password storage

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-653:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> Extensible password storage
> ---
>
> Key: COUCHDB-653
> URL: https://issues.apache.org/jira/browse/COUCHDB-653
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface, Infrastructure
>Reporter: Filipe Manana
> Fix For: 1.3
>
> Attachments: couchdb-extensible-passwd-storage-trunk.patch
>
>
> As it has been discussed in the @dev mailing list, CouchDB should be 
> configurable to use customizable password storage/hashing schemes.
> Brian Candler suggested the support for the OpenLDAP schemes for example.
> From the Auth roadmap mail chain:
> "1) Extensible password storage.
> Thanks Brian Candler for the links to the OpenLDAP style of storage. I
> think we should do this asap so we don't have to worry about backwards
> compatibility with the current storage mechanism until the end of
> time. The relevant message:
> http://permalink.gmane.org/gmane.comp.db.couchdb.devel/7588";

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-776) _replicator DB

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-776:
-

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> _replicator DB
> --
>
> Key: COUCHDB-776
> URL: https://issues.apache.org/jira/browse/COUCHDB-776
> Project: CouchDB
>  Issue Type: New Feature
>  Components: Replication
> Environment: trunk
>Reporter: Filipe Manana
>Assignee: Benoit Chesneau
>  Labels: _replicator, configuration, db, replicator
> Fix For: 1.3
>
> Attachments: replicator admin.jpg
>
>
> As discussed in the mailing list thread "_replicator DB" (May) -
> http://mail-archives.apache.org/mod_mbox/couchdb-dev/201005.mbox/%3caanlktilfnng9fuxuxjb5cazo6__mjaogpiw4xtuzp...@mail.gmail.com%3E
> The patch follows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1070) Update autotools configuration

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1070:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3

> Update autotools configuration
> --
>
> Key: COUCHDB-1070
> URL: https://issues.apache.org/jira/browse/COUCHDB-1070
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Infrastructure
>Affects Versions: 1.0.2
>Reporter: Javier Jardón
>Priority: Minor
>  Labels: autotools, build
> Fix For: 1.3
>
> Attachments: update_autotools.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Replace deprecated autoconf macros and use new libtool syntax
> Also use silent rules to silence the output a bit

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1188) View query option defaults

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1188:
--

Fix Version/s: (was: 1.2)
   1.3

Bump to 1.3.x

> View query option defaults
> --
>
> Key: COUCHDB-1188
> URL: https://issues.apache.org/jira/browse/COUCHDB-1188
> Project: CouchDB
>  Issue Type: New Feature
>  Components: JavaScript View Server
>Affects Versions: 1.0.2
>Reporter: David Zülke
>Priority: Minor
>  Labels: query, view
> Fix For: 1.3
>
>
> Currently, it's necessary to have intimate-ish knowledge of the inner 
> workings of a view when calling it, e.g.:
> http://localhost:5984/mydb/_design/burp/_view/count-laser-beams?group_level=2
> If the group level was different, the results returned by the view might be 
> useless.
> Other good examples are "include_docs", "inclusive_end" or "descending". For 
> instance, views that pull in foreign documents by emitting {_id: ...} as a 
> value will only produce useful results when called with "include_docs" set to 
> true.
> I'd suggest a feature where inside a view definition, a new key 
> "query_defaults" alongside "map" or "reduce" contains a hash map of query 
> option keys and values that will be used when calling the view unless one of 
> the pre-defined options is passed as a query argument, in which case the 
> explicitly given query argument would take precedence.
> Example:
> "views": {
>"talks-by-room": {
>"map": "function(doc) {\n\tif(doc.type == 'talk' && doc.date_start) 
> {\n\t\temit([doc.room, doc.date_start, 0], doc.name);\n\t\tif(doc.speaker) 
> {\n\t\t\temit([doc.room, doc.date_start, 1], {_id: 
> doc.speaker});\n\t\t}\n\t}\n};",
>"query_defaults": {
>"include_docs": true
>}
>}
> }
> http://localhost:5984/couchcamp/_design/burp/_view/talks-by-room would be run 
> with include_docs=true, but the doc inclusion could be suppressed by 
> requesting 
> http://localhost:5984/couchcamp/_design/burp/_view/talks-by-room?include_docs=false
> Alternative names for the new key are "query_options" or 
> "query_option_defaults". Whilst I prefer "query_options", I think 
> "query_defaults" will be the better choice as it underlines the nature of the 
> functionality - namely, that the options defined therein may be overridden by 
> the caller.
> Someone on the dev list suggested to use _rewrite, but the idea is that the 
> defaults also apply when invoking a list function. So you'd need two 
> rewrites, one for the view if you want to call it standalone, and one for the 
> list function. And then you'd still have the issue that the behavior of the 
> view is changed by the rewrite, which is confusing to anyone looking at the 
> view code - you have to look at the rewrite as well to get the whole picture. 
> Not good.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-271) preventing compaction from ruining the OS block cache

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-271:
-

Fix Version/s: (was: 1.2)
   1.3

> preventing compaction from ruining the OS block cache
> -
>
> Key: COUCHDB-271
> URL: https://issues.apache.org/jira/browse/COUCHDB-271
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Affects Versions: 0.8.1, 0.9
>Reporter: Jan Lehnardt
> Fix For: 1.3
>
>
> Adam Kocolosk:
> Hi, I've noticed that compacting large DBs pretty much kills any filesystem 
> caching benefits for CouchDB.  I believe the problem is that the OS (Linux 
> 2.6.21 kernel in my case) is caching blocks from the .compact file, even 
> though those blocks won't be read again until compaction has finished.  In 
> the meantime, the portion of the cache dedicated to the old DB file shrinks 
> and performance really suffers.
> I think a better mode of operation would be to advise/instruct the OS not to 
> cache any portion of the .compact file until we're ready to replace the main 
> DB.  On Linux, specifying the POSIX_FADV_DONTNEED option to posix_fadvise() 
> seems like the way to go:
> http://linux.die.net/man/2/posix_fadvise
> This link has a little more detail and a usage example:
> http://insights.oetiker.ch/linux/fadvise.html
> Of course, POSIX_FADV_DONTNEED isn't really available from inside the Erlang 
> VM.  Perhaps the simplest approach would be to have a helper process that we 
> can spawn which calls that function (or its equivalent on a non-Linux OS) 
> periodically during compaction?  I'm not really sure, but I wanted to get 
> this out on the list for discussion.  Best,

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1175) Improve content type negotiation for couchdb JSON responses

2012-01-05 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1175:
--

Fix Version/s: (was: 1.2)
   1.3

bump to 1.3.x

> Improve content type negotiation for couchdb JSON responses
> ---
>
> Key: COUCHDB-1175
> URL: https://issues.apache.org/jira/browse/COUCHDB-1175
> Project: CouchDB
>  Issue Type: Improvement
>Affects Versions: 1.0.2
>Reporter: Robert Newson
>Priority: Blocker
> Fix For: 1.3
>
>
> Currently we ignore qvalues when negotiation between 'application/json' and 
> 'text/plain' when returning JSON responses.
> Specifically, we test directly for 'application/json' or 'text/plain' in the 
> Accept header. Different branches have different bugs, though. Trunk returns 
> 'application/json' if 'application/json' is present at all, even if it's less 
> preferred than 'text/plain' when qvalues are accounted for.
> We should follow the standard.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1342) Asynchronous file writes

2011-11-16 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1342:
--

Attachment: COUCHDB-1342.patch

> Asynchronous file writes
> 
>
> Key: COUCHDB-1342
> URL: https://issues.apache.org/jira/browse/COUCHDB-1342
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
>Reporter: Jan Lehnardt
> Fix For: 1.3
>
> Attachments: COUCHDB-1342.patch
>
>
> This change updates the file module so that it can do
> asynchronous writes. Basically it replies immediately
> to process asking to write something to the file, with
> the position where the chunks will be written to the
> file, while a dedicated child process keeps collecting
> chunks and write them to the file (and batching them
> when possible). After issuing a series of write request
> to the file module, the caller can call its 'flush'
> function which will block the caller until all the
> chunks it requested to write are effectively written
> to the file.
> This maximizes the IO subsystem, as for example, while
> the updater is traversing and modifying the btrees and
> doing CPU bound tasks, the writes are happening in
> parallel.
> Originally described at http://s.apache.org/TVu
> Github Commit: 
> https://github.com/fdmanana/couchdb/commit/e82a673f119b82dddf674ac2e6233cd78c123554

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1009) Make couch_stream buffer configurable

2011-10-29 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1009:
--

Attachment: COUCHDB-1009-rebased.patch

Rebased against master.

@FIlipe, don't we need to listen to config changes and restart or reconfigure 
the gen_server or its state with the new config value?

> Make couch_stream buffer configurable
> -
>
> Key: COUCHDB-1009
> URL: https://issues.apache.org/jira/browse/COUCHDB-1009
> Project: CouchDB
>  Issue Type: Improvement
>  Components: Database Core
> Environment: trunk
>Reporter: Filipe Manana
>Assignee: Filipe Manana
>Priority: Trivial
> Attachments: COUCHDB-1009-2.patch, COUCHDB-1009-rebased.patch, 
> COUCHDB-1009.patch
>
>
> The couch_stream buffer is hardcoded to 4Kb.
> This value should be configurable. Larger values can improve write and 
> specially read performance (if we write larger chunks to disk, we have higher 
> chances of reading more contiguous disk blocks afterwards). 
> I also think it's a good idea to change the default value from 4Kb to 
> something higher (64Kb for e.g.).
> Patch attached

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1225) missing_named_view error on existing erlang design doc and view

2011-10-29 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1225:
--

Summary: missing_named_view error on existing erlang design doc and view  
(was: missing_named_view error on existing design doc and view)

> missing_named_view error on existing erlang design doc and view
> ---
>
> Key: COUCHDB-1225
> URL: https://issues.apache.org/jira/browse/COUCHDB-1225
> Project: CouchDB
>  Issue Type: Bug
> Environment: Erlang 1:14.b.3
> CouchDB 1.2.0a-f7cc8fa-git
> Ubuntu Lucid 10.04 64bit
>Reporter: Alex Koshelev
>
> curl 
> foo.bar:5984/cray_frame_11266/_design/admin/_view/regions_by_channel?limit=1
> {"error":"not_found","reason":"missing_named_view"}
> It worked some time ago but now there is constantly the error. If I restart 
> CoucDB it will solve this issue. Updating the desing doc also solves the 
> issue.
> With debug log level I get this messages:
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] 'GET' 
> /cray_frame_11266/_design/admin/_view/regions_by_channel?limit=1 {1,
>   
>   1} from "93.158.159.91"
> Headers: [{'Accept',"*/*"},
>   {'Host',"foo.bar:5984"},
>   {'User-Agent',"curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 
> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"}]
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] OAuth Params: 
> [{"limit","1"}]
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] request_group {Pid, Seq} 
> {<0.6419.0>,311}
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] request_group {Pid, Seq} 
> {<0.6419.0>,311}
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] Minor error in HTTP 
> request: {not_found,
>   missing_named_view}
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] Stacktrace: 
> [{io_lib_pretty,cind_tag_tuple,7},
>  {io_lib_pretty,while_fail,3},
>  {io_lib_pretty,print,6},
>  {io_lib_format,build,3},
>  {io_lib_format,build,3},
>  {io_lib_format,build,3},
>  {io_lib_format,build,3},
>  {io_lib_format,build,3}]
> [Sat, 16 Jul 2011 23:40:44 GMT] [info] [<0.898.3>] 0.0.0.0 - - GET 
> /cray_frame_11266/_design/admin/_view/regions_by_channel?limit=1 404
> [Sat, 16 Jul 2011 23:40:44 GMT] [debug] [<0.898.3>] httpd 404 error response:
>  {"error":"not_found","reason":"missing_named_view"}
> I've also tried to get _info about design doc and found that it have had zero 
> data_size:
> > curl foo.bar:5984/cray_frame_11266/_design/admin/_info | python -mjson.tool
> {
> "name": "admin", 
> "view_index": {
> "compact_running": false, 
> "data_size": 0, 
> "disk_size": 90241, 
> "language": "erlang", 
> "purge_seq": 0, 
> "signature": "09b8b599cad584406b7aa5956b98a335", 
> "update_seq": 311, 
> "updater_running": false, 
> "waiting_clients": 0, 
> "waiting_commit": false
> }
> }
> In the same time another similar design doc works fine and has some data_size:
> > curl foo.bar:5984/cray_frame_11266/_design/web/_info | python -mjson.tool
> {
> "name": "web", 
> "view_index": {
> "compact_running": false, 
> "data_size": 7462075, 
> "disk_size": 9138406, 
> "language": "erlang", 
> "purge_seq": 0, 
> "signature": "7f01f0c843b3bbb79d00ec4ff8d43010", 
> "update_seq": 311, 
> "updater_running": false, 
> "waiting_clients": 0, 
> "waiting_commit": false
> }
> }
> Over the year ago Mark Anderson has asked similar questing in the thread 
> called "Need help diagnosing couchdb view 404s" [1] but seams did not found 
> any answer than. 
> [1]: http://comments.gmane.org/gmane.comp.db.couchdb.user/8994

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (COUCHDB-1304) set Expires header on session cookies to make them persistent

2011-10-29 Thread Jan Lehnardt (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lehnardt updated COUCHDB-1304:
--

Fix Version/s: (was: 1.1)
   1.2

The earliest we can "fix" this is 1.2.

> set Expires header on session cookies to make them persistent
> -
>
> Key: COUCHDB-1304
> URL: https://issues.apache.org/jira/browse/COUCHDB-1304
> Project: CouchDB
>  Issue Type: Improvement
>  Components: HTTP Interface
>Affects Versions: 1.1
>Reporter: max ogden
>Priority: Minor
>  Labels: authentication, cookie
> Fix For: 1.2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> currently couch's cookie based authentication only sets session cookies as 
> opposed to persistent cookies. the difference between these two is the 
> Expires header. if it is not present most web browsers will delete your 
> cookie when you quit your browser, whereas if it is set then your browser 
> keeps the cookie around until the time specified by the Expires header.
> This sucks for UX because users quit and re-launch their browser they'll have 
> to log in again. 
> I am proposing that we set the Expires header in cookies to match the time in 
> the couch_httpd_auth timeout
> p.s. this is similar to the issue I opened 
> https://issues.apache.org/jira/browse/COUCHDB-1095 but at that time I didn't 
> realize that what I really wanted was the Expires header

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira