Permalink
Browse files

Merge CouchDB 1.1

  • Loading branch information...
2 parents 266ba88 + 3c1a0d7 commit e9a5a6f90a021db1db8a7e55ec797a4c86edcad6 Robert Newson committed Jun 13, 2011
Showing with 5,998 additions and 1,486 deletions.
  1. +3 −0 .gitignore
  2. +1 −1 apps/couch/AUTHORS
  3. +60 −0 apps/couch/CHANGES
  4. +1 −1 apps/couch/INSTALL.Unix
  5. +12 −7 apps/couch/INSTALL.Windows
  6. +33 −3 apps/couch/NEWS
  7. +5 −1 apps/couch/NOTICE
  8. +11 −0 apps/couch/THANKS
  9. +11 −21 apps/couch/include/couch_db.hrl
  10. +4 −0 apps/couch/license.skip
  11. +1 −1 apps/couch/src/couch_btree.erl
  12. +161 −79 apps/couch/src/couch_changes.erl
  13. +25 −14 apps/couch/src/couch_config.erl
  14. +8 −1 apps/couch/src/couch_config_writer.erl
  15. +10 −3 apps/couch/src/couch_db.erl
  16. +9 −6 apps/couch/src/couch_db_updater.erl
  17. +46 −10 apps/couch/src/couch_doc.erl
  18. +6 −2 apps/couch/src/couch_event_sup.erl
  19. +42 −13 apps/couch/src/couch_file.erl
  20. +122 −114 apps/couch/src/couch_httpd.erl
  21. +20 −9 apps/couch/src/couch_httpd_auth.erl
  22. +187 −100 apps/couch/src/couch_httpd_db.erl
  23. +10 −3 apps/couch/src/couch_httpd_external.erl
  24. +72 −14 apps/couch/src/couch_httpd_misc_handlers.erl
  25. +431 −0 apps/couch/src/couch_httpd_proxy.erl
  26. +112 −77 apps/couch/src/couch_httpd_rewrite.erl
  27. +18 −13 apps/couch/src/couch_httpd_show.erl
  28. +403 −0 apps/couch/src/couch_httpd_vhost.erl
  29. +97 −36 apps/couch/src/couch_httpd_view.erl
  30. +141 −0 apps/couch/src/couch_js_functions.hrl
  31. +38 −17 apps/couch/src/couch_key_tree.erl
  32. +58 −21 apps/couch/src/couch_log.erl
  33. +364 −0 apps/couch/src/couch_os_daemons.erl
  34. +1 −1 apps/couch/src/couch_proc_manager.erl
  35. +28 −6 apps/couch/src/couch_query_servers.erl
  36. +315 −135 apps/couch/src/couch_rep.erl
  37. +1 −2 apps/couch/src/couch_rep_att.erl
  38. +174 −73 apps/couch/src/couch_rep_changes_feed.erl
  39. +33 −11 apps/couch/src/couch_rep_httpc.erl
  40. +9 −71 apps/couch/src/couch_rep_reader.erl
  41. +6 −12 apps/couch/src/couch_rep_writer.erl
  42. +387 −0 apps/couch/src/couch_replication_manager.erl
  43. +2 −1 apps/couch/src/couch_server.erl
  44. +32 −6 apps/couch/src/couch_server_sup.erl
  45. +41 −3 apps/couch/src/couch_stream.erl
  46. +48 −31 apps/couch/src/couch_util.erl
  47. +58 −27 apps/couch/src/couch_view.erl
  48. +79 −46 apps/couch/src/couch_view_group.erl
  49. +21 −8 apps/couch/src/couch_view_updater.erl
  50. +87 −47 apps/couch/src/couch_work_queue.erl
  51. +10 −2 apps/couch/src/test_util.erl
  52. +2 −1 apps/couch/test/etap/010-file-basics.t
  53. +2 −2 apps/couch/test/etap/021-btree-reductions.t
  54. +3 −0 apps/couch/test/etap/030-doc-from-json.t
  55. +3 −0 apps/couch/test/etap/031-doc-to-json.t
  56. +3 −3 apps/couch/test/etap/050-stream.t
  57. +1 −1 apps/couch/test/etap/083-config-no-files.t
  58. +19 −0 apps/couch/test/etap/random_port.ini
  59. +30 −0 apps/couch/test/etap/test_cfg_register.c
  60. +99 −0 apps/couch/test/etap/test_web.erl
  61. +2 −1 couchjs/js/json2.js
  62. +1 −0 couchjs/js/loop.js
  63. +4 −4 couchjs/js/render.js
  64. +6 −1 couchjs/js/state.js
  65. +23 −12 couchjs/js/util.js
  66. +4 −4 rebar.config
  67. +27 −2 rel/overlay/etc/default.ini
  68. +6 −7 rel/overlay/share/www/_sidebar.html
  69. +4 −1 rel/overlay/share/www/couch_tests.html
  70. +1 −1 rel/overlay/share/www/custom_test.html
  71. +40 −11 rel/overlay/share/www/replicator.html
  72. +2 −2 rel/overlay/share/www/script/couch.js
  73. +4 −0 rel/overlay/share/www/script/couch_tests.js
  74. +6 −4 rel/overlay/share/www/script/futon.browse.js
  75. +2 −2 rel/overlay/share/www/script/futon.format.js
  76. +55 −0 rel/overlay/share/www/script/futon.js
  77. +66 −29 rel/overlay/share/www/script/jquery.couch.js
  78. +2 −1 rel/overlay/share/www/script/json2.js
  79. +1 −1 rel/overlay/share/www/script/jspec/jspec.js
  80. +41 −0 rel/overlay/share/www/script/test/all_docs.js
  81. +26 −15 rel/overlay/share/www/script/test/attachment_names.js
  82. +2 −0 rel/overlay/share/www/script/test/attachments.js
  83. +167 −2 rel/overlay/share/www/script/test/attachments_multipart.js
  84. +6 −8 rel/overlay/share/www/script/test/basics.js
  85. +134 −23 rel/overlay/share/www/script/test/changes.js
  86. +101 −5 rel/overlay/share/www/script/test/config.js
  87. +25 −0 rel/overlay/share/www/script/test/conflicts.js
  88. +12 −0 rel/overlay/share/www/script/test/cookie_auth.js
  89. +3 −0 rel/overlay/share/www/script/test/copy_doc.js
  90. +385 −150 rel/overlay/share/www/script/test/design_docs.js
  91. +92 −6 rel/overlay/share/www/script/test/etags_views.js
  92. +3 −3 rel/overlay/share/www/script/test/http.js
  93. +1 −1 rel/overlay/share/www/script/test/jsonp.js
  94. +47 −0 rel/overlay/share/www/script/test/list_views.js
  95. +14 −14 rel/overlay/share/www/script/test/oauth.js
  96. +1 −1 rel/overlay/share/www/script/test/proxyauth.js
  97. +32 −0 rel/overlay/share/www/script/test/purge.js
  98. +25 −0 rel/overlay/share/www/script/test/reduce_builtin.js
  99. +244 −59 rel/overlay/share/www/script/test/replication.js
  100. +60 −0 rel/overlay/share/www/script/test/rewrite.js
  101. +4 −4 rel/overlay/share/www/script/test/security_validation.js
  102. +22 −0 rel/overlay/share/www/script/test/show_documents.js
  103. +4 −0 rel/overlay/share/www/script/test/update_documents.js
  104. +8 −0 rel/overlay/share/www/script/test/view_errors.js
  105. +54 −0 rel/overlay/share/www/script/test/view_include_docs.js
  106. +37 −0 rel/overlay/share/www/script/test/view_multi_key_all_docs.js
  107. +78 −0 rel/overlay/share/www/script/test/view_multi_key_design.js
  108. +74 −49 rel/overlay/share/www/script/test/view_pagination.js
  109. +21 −4 rel/overlay/share/www/script/test/view_update_seq.js
  110. +3 −3 rel/overlay/share/www/style/layout.css
View
@@ -2,6 +2,9 @@
*.so
*.Tpo
*.beam
+*~
+*.orig
+*.rej
erl_crash.dump
# building
View
@@ -15,6 +15,6 @@ documentation or developing software. Some of these people are:
* Mark Hammond <mhammond@skippinet.com.au>
* Benoît Chesneau <benoitc@apache.org>
* Filipe Manana <fdmanana@apache.org>
- * Robert Newson <robert.newson@gmail.com>
+ * Robert Newson <rnewson@apache.org>
For a list of other credits see the `THANKS` file.
View
@@ -1,6 +1,66 @@
Apache CouchDB CHANGES
======================
+Version 1.1.1
+-------------
+
+This version has not been released yet.
+
+Version 1.1.0
+-------------
+
+All CHANGES for 1.0.2 and 1.0.3 also apply to 1.1.0.
+
+HTTP Interface:
+
+ * Native SSL support.
+ * Added support for HTTP range requests for attachments.
+ * Added built-in filters for `_changes`: `_doc_ids` and `_design`.
+ * Added configuration option for TCP_NODELAY aka "Nagle".
+ * Allow POSTing arguments to `_changes`.
+ * Allow `keys` parameter for GET requests to views.
+ * Allow wildcards in vhosts definitions.
+ * More granular ETag support for views.
+ * More flexible URL rewriter.
+ * Added support for recognizing "Q values" and media parameters in
+ HTTP Accept headers.
+ * Validate doc ids that come from a PUT to a URL.
+
+Externals:
+
+ * Added OS Process module to manage daemons outside of CouchDB.
+ * Added HTTP Proxy handler for more scalable externals.
+
+Replicator:
+
+ * Added `_replicator` database to manage replications.
+ * Fixed issues when an endpoint is a remote database accessible via SSL.
+ * Added support for continuous by-doc-IDs replication.
+ * Fix issue where revision info was omitted when replicating attachments.
+ * Integrity of attachment replication is now verified by MD5.
+
+Storage System:
+
+ * Multiple micro-optimizations when reading data.
+
+View Server:
+
+ * Added CommonJS support to map functions.
+ * Added `stale=update_after` query option that triggers a view update after
+ returning a `stale=ok` response.
+ * Warn about empty result caused by `startkey` and `endkey` limiting.
+ * Built-in reduce function `_sum` now accepts lists of integers as input.
+ * Added view query aliases start_key, end_key, start_key_doc_id and
+ end_key_doc_id.
+
+Futon:
+
+ * Added a "change password"-feature to Futon.
+
+URL Rewriter & Vhosts:
+
+ * Fix for variable substituion
+
Version 1.0.2
-------------
View
@@ -8,7 +8,7 @@ Dependencies
You will need the following installed:
- * Erlang OTP (>=R12B5) (http://erlang.org/)
+ * Erlang OTP (>=R13B2) (http://erlang.org/)
* ICU (http://icu.sourceforge.net/)
* OpenSSL (http://www.openssl.org/)
* Mozilla SpiderMonkey (1.8) (http://www.mozilla.org/js/spidermonkey/)
View
@@ -8,7 +8,7 @@ Dependencies
You will need the following installed:
- * Erlang OTP (>=R12B5) (http://erlang.org/)
+ * Erlang OTP (=14B01) (http://erlang.org/)
* ICU (http://icu.sourceforge.net/)
* OpenSSL (http://www.openssl.org/)
* Mozilla SpiderMonkey (1.8) (http://www.mozilla.org/js/spidermonkey/)
@@ -50,12 +50,17 @@ You must check that:
* The `which cl` command points to the Microsoft compiler.
-If you do not do this, the ones found in `/usr/bin` may be used instead.
+ * The `which mc` command points to the Microsoft message compiler.
+
+ * The `which mt` command points to the Microsoft manifest tool.
+
+If you do not do this, the build may fail due to Cygwin ones found in `/usr/bin`
+being used instead.
Building Erlang
---------------
-You must include OpenSSL.
+You must include Win32 OpenSSL.
However, you can skip the GUI tools by running:
@@ -89,7 +94,7 @@ Remember to use `/cygdrive/c/` instead of `c:/` as the directory prefix.
To set up your path, run:
- export PATH=$ERL_TOP/release/win32/erts-5.7.2/bin:$PATH
+ export PATH=$ERL_TOP/release/win32/erts-5.8.2/bin:$PATH
If everything was successful, you should be ready to build CouchDB.
@@ -101,8 +106,8 @@ Building CouchDB
Once you have satisfied the dependencies you should run:
./configure \
- --with-js-include=/cygdrive/c/path_to_seamonkey_include \
- --with-js-lib=/cygdrive/c/path_to_seamonkey_lib \
+ --with-js-include=/cygdrive/c/path_to_spidermonkey_include \
+ --with-js-lib=/cygdrive/c/path_to_spidermonkey_lib \
--with-win32-icu-binaries=/cygdrive/c/path_to_icu_binaries_root \
--with-erlang=$ERL_TOP/release/win32/usr/include \
--with-win32-curl=/cygdrive/c/path/to/curl/root/directory \
@@ -145,4 +150,4 @@ To check that everything has worked, point your web browser to:
http://127.0.0.1:5984/_utils/index.html
-From here you should run the test suite.
+From here you should run the test suite in either Firefox 3.6+ or Safari 4+.
View
@@ -7,6 +7,36 @@ For details about backwards incompatible changes, see:
Each release section notes when backwards incompatible changes have been made.
+Version 1.1.1
+-------------
+
+This version has not been released yet.
+
+Version 1.1.0
+-------------
+
+All NEWS for 1.0.2 also apply to 1.1.0.
+
+This release contains backwards incompatible changes.
+
+ * Native SSL support.
+ * Added support for HTTP range requests for attachments.
+ * Added built-in filters for `_changes`: `_doc_ids` and `_design`.
+ * Added configuration option for TCP_NODELAY aka "Nagle".
+ * Allow wildcards in vhosts definitions.
+ * More granular ETag support for views.
+ * More flexible URL rewriter.
+ * Added OS Process module to manage daemons outside of CouchDB.
+ * Added HTTP Proxy handler for more scalable externals.
+ * Added `_replicator` database to manage replications.
+ * Multiple micro-optimizations when reading data.
+ * Added CommonJS support to map functions.
+ * Added `stale=update_after` query option that triggers a view update after
+ returning a `stale=ok` response.
+ * More explicit error messages when it's not possible to access a file due
+ to lack of permissions.
+ * Added a "change password"-feature to Futon.
+
Version 1.0.2
-------------
@@ -166,7 +196,7 @@ Version 0.10.1
Version 0.10.0
--------------
-This release contains backwards incompatible changes, please see above for help.
+This release contains backwards incompatible changes.
* General performance improvements.
* View index generation speedups.
@@ -198,7 +228,7 @@ Version 0.9.1
Version 0.9.0
-------------
-This release contains backwards incompatible changes, please see above for help.
+This release contains backwards incompatible changes.
* Modular configuration.
* Performance enhancements for document and view access.
@@ -222,7 +252,7 @@ Version 0.8.1-incubating
Version 0.8.0-incubating
------------------------
-This release contains backwards incompatible changes, please see above for help.
+This release contains backwards incompatible changes.
* Changed core licensing to the Apache Software License 2.0.
* Refactoring of the core view and storage engines.
View
@@ -17,6 +17,10 @@ This product also includes the following third-party components:
* jQuery (http://jquery.com/)
Copyright 2010, John Resig
+
+ * jQuery UI (http://jqueryui.com)
+
+ Copyright 2011, Paul Bakaus
* json2.js (http://www.json.org/)
@@ -46,6 +50,6 @@ This product also includes the following third-party components:
Copyright 1999, Masanao Izumo <iz@onicos.co.jp>
-* jspec.js (http://visionmedia.github.com/jspec/)
+ * jspec.js (http://visionmedia.github.com/jspec/)
Copyright 2010 TJ Holowaychuk <tj@vision-media.ca>
View
@@ -63,12 +63,23 @@ suggesting improvements or submitting changes. Some of these people are:
* Paul Bonser <pib@paulbonser.com>
* Caleb Land <caleb.land@gmail.com>
* Juhani Ränkimies <juhani@juranki.com>
+ * Kev Jackson <foamdino@gmail.com>
+ * Jonathan D. Knezek <jdknezek@gmail.com>
+ * David Rose <doppler@gmail.com>
* Lim Yue Chuan <shasderias@gmail.com>
* David Davis <xantus@xantus.org>
+ * Klaus Trainer <klaus.trainer@web.de>
* Dale Harvey <dale@arandomurl.com>
* Juuso Väänänen <juuso@vaananen.org>
+ * Jeff Zellner <jeff.zellner@gmail.com>
* Benjamin Young <byoung@bigbluehat.com>
* Gabriel Farrell <gsf747@gmail.com>
* Mike Leddy <mike@loop.com.br>
+ * Felix Hummel <apache@felixhummel.de>
+ * Tim Smith <tim@couchbase.com>
+ * Sam Bisbee <sam@sbisbee.com>
+ * Nathan Vander Wilt <natevw@yahoo.com>
+ * Caolan McMahon <caolan.mcmahon@googlemail.com>
+
For a list of authors see the `AUTHORS` file.
@@ -25,26 +25,9 @@
-define(DEFAULT_ATTACHMENT_CONTENT_TYPE, <<"application/octet-stream">>).
--define(LOG_DEBUG(Format, Args),
- case couch_log:debug_on() of
- true ->
- gen_event:sync_notify(error_logger,
- {self(), couch_debug, erlang:get(nonce), {Format, Args}});
- false -> ok
- end).
-
--define(LOG_INFO(Format, Args),
- case couch_log:info_on() of
- true ->
- gen_event:sync_notify(error_logger,
- {self(), couch_info, erlang:get(nonce), {Format, Args}});
- false -> ok
- end).
-
--define(LOG_ERROR(Format, Args),
- gen_event:sync_notify(error_logger,
- {self(), couch_error, erlang:get(nonce), {Format, Args}})).
-
+-define(LOG_DEBUG(Format, Args), couch_log:debug(Format, Args)).
+-define(LOG_INFO(Format, Args), couch_log:info(Format, Args)).
+-define(LOG_ERROR(Format, Args), couch_log:error(Format, Args)).
-record(rev_info,
{
@@ -73,6 +56,7 @@
{mochi_req,
peer,
method,
+ requested_path_parts,
path_parts,
db_url_handlers,
user_ctx,
@@ -194,6 +178,7 @@
view_type = nil,
include_docs = false,
+ conflicts = false,
stale = false,
multi_get = false,
callback = nil,
@@ -231,6 +216,7 @@
def_lang,
design_options=[],
views,
+ lib,
id_btree=nil,
current_seq=0,
purge_seq=0,
@@ -240,6 +226,8 @@
-record(view,
{id_num,
+ update_seq=0,
+ purge_seq=0,
map_names=[],
def,
btree=nil,
@@ -287,7 +275,9 @@
heartbeat,
timeout,
filter = "",
- include_docs = false
+ include_docs = false,
+ conflicts = false,
+ db_open_options = []
}).
-record(proc, {
View
@@ -66,6 +66,7 @@
^share/www/script/sha1.js
^share/www/script/base64.js
^share/www/script/test/lorem*
+^share/www/style/jquery-ui-1.8.11.custom.css
^src/Makefile
^src/Makefile.in
^src/couchdb/.*beam
@@ -92,6 +93,9 @@
^test/bench/Makefile
^test/bench/Makefile.in
^test/etap/.*beam
+^test/etap/.*\.o
+^test/etap/.deps/*
+^test/etap/test_cfg_register
^test/etap/Makefile
^test/etap/Makefile.in
^test/etap/temp.*
@@ -198,7 +198,7 @@ query_modify(Bt, LookupKeys, InsertValues, RemoveKeys) ->
{ok, NewRoot, Bt3} = complete_root(Bt2, KeyPointers),
{ok, QueryResults, Bt3#btree{root=NewRoot}}.
-% for ordering different operatations with the same key.
+% for ordering different operations with the same key.
% fetch < remove < insert
op_order(fetch) -> 1;
op_order(remove) -> 2;
Oops, something went wrong.

0 comments on commit e9a5a6f

Please sign in to comment.