couchdb-couch-httpd.git
8 years agoexpose couch_httpd:send_error 1994-merge-rcouch
benoitc [Tue, 8 Jul 2014 12:27:42 +0000 (14:27 +0200)] 
expose couch_httpd:send_error

8 years agoadd maintainance handler
benoitc [Tue, 8 Jul 2014 11:17:42 +0000 (13:17 +0200)] 
add maintainance handler

8 years agowrap the chunk fun so rcouch-couch doesn't depends on mochiweb
benoitc [Tue, 8 Jul 2014 09:10:59 +0000 (11:10 +0200)] 
wrap the chunk fun so rcouch-couch doesn't depends on mochiweb

8 years agofix view changes filter check
benoitc [Sun, 6 Jul 2014 07:10:19 +0000 (09:10 +0200)] 
fix view changes filter check

8 years agoadd multi view queries support
benoitc [Sat, 5 Jul 2014 23:21:03 +0000 (01:21 +0200)] 
add multi view queries support

8 years agoview changes: distinct deleted document from removed keys
benoitc [Thu, 3 Jul 2014 11:07:33 +0000 (13:07 +0200)] 
view changes: distinct deleted document from removed keys

8 years agoview changes: fix json_req parsing
benoitc [Thu, 3 Jul 2014 09:31:17 +0000 (11:31 +0200)] 
view changes: fix json_req parsing

8 years agodisplay deleted keys change
benoitc [Thu, 3 Jul 2014 08:23:57 +0000 (10:23 +0200)] 
display deleted keys change

8 years agocorrectly pass timeout and heartbeat options.
benoitc [Wed, 2 Jul 2014 09:00:49 +0000 (11:00 +0200)] 
correctly pass timeout and heartbeat options.

8 years agofix typo
benoitc [Tue, 1 Jul 2014 10:00:46 +0000 (12:00 +0200)] 
fix typo

8 years agoAdopt to the recent erlang-oauth (1.3+)
Peter Lemenkov [Fri, 10 Jan 2014 12:30:25 +0000 (16:30 +0400)] 
Adopt to the recent erlang-oauth (1.3+)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Alexander Shorin <kxepal@apache.org>
8 years agocouch_replicator: add replication using changes in a view
benoitc [Sat, 8 Feb 2014 23:43:23 +0000 (00:43 +0100)] 
couch_replicator: add replication using changes in a view

Instead of a database, the replicator can now filter the documents using
a view index. All documents having a key emitted in the view can be
replicated.

View parameters can be used. Which means that you can replicate results
corresponding to a key in a view or a range.

8 years agocouch_httpd_changes: check removed keys from the view filter
benoitc [Sat, 8 Feb 2014 20:27:58 +0000 (21:27 +0100)] 
couch_httpd_changes: check removed keys from the view filter

Make sure to only emit deleted document when a deleted key is passed to
the view filter.

8 years agocouch_index: add background indexing facility
benoitc [Sat, 8 Feb 2014 18:55:40 +0000 (19:55 +0100)] 
couch_index: add background indexing facility

This change add the possibility to trigger a view indexation in
background. The indexation can only work in background if at least one
process acquired it using the `couch_index_server:acquire_index/3`
function. If all the process that acquired it are down or released it
using `couch_index_server:release_indexer/3` then the background task is
stopped.

By default the background indexation will happen every 1s or when 200
docs has been saved in the database. These parameters can be changed
using the options `threshold` and `refresh_interval` in the couch_index
section.

To use it with couch_mrview a new option {refresh, true} has been added
to couch_mrview_changes:handle_changes Also the query parameter
refresh=true is passsed in t the HTTP changes API.

8 years agoadd the option use_index={no,yes} (yes by default)
benoitc [Fri, 7 Feb 2014 14:57:25 +0000 (15:57 +0100)] 
add the option use_index={no,yes} (yes by default)

If use_index=no even if the view is indexed by sequence, the index won't
be use. Instead it will fold the btree and return the changes each time
the view map function can emit a value. (default behaviour).

8 years agoadd supports of view changes in the _changes API
benoitc [Fri, 7 Feb 2014 14:38:34 +0000 (15:38 +0100)] 
add supports of view changes in the _changes API

Now when the option `seq_indexed=true` is set in the design doc, the
view filter in _changes will use it to retrieve the results. Compared to
the current way, using a view index will be faster to retrieve changes.
It also gives the possibility to filter changes by key or get changes in
a key range. All the view options can be used.

Note 1: if someone is trying to filter a changes with view options when
the views are not indexed by sequence, a 400 error will be returned.
Note 2: The changes will only be returned when the view is updated if
seq_indexed=true

8 years agoextract couch_httpd changes API in its own module
benoitc [Sun, 2 Feb 2014 18:54:01 +0000 (19:54 +0100)] 
extract couch_httpd changes API in its own module

8 years agoSpeed up and move couch_httpd:find_in_binary.
NickNorth [Tue, 3 Dec 2013 20:58:53 +0000 (20:58 +0000)] 
Speed up and move couch_httpd:find_in_binary.

See https://issues.apache.org/jira/browse/COUCHDB-1953

8 years agoMove addition of qs params after normalization
Adam Kocoloski [Sat, 18 Jan 2014 05:31:49 +0000 (00:31 -0500)] 
Move addition of qs params after normalization

This refactor executes normalize_path/1 before appending the bound query
string parameters.

COUCHDB-2031

8 years agofix rebarclean
benoitc [Wed, 15 Jan 2014 20:10:45 +0000 (21:10 +0100)] 
fix rebarclean

8 years agocouch_server_sup -> couch_sup
benoitc [Mon, 13 Jan 2014 22:06:26 +0000 (23:06 +0100)] 
couch_server_sup -> couch_sup

8 years agoa more descriptive comment of the listener reloading flow
benoitc [Mon, 13 Jan 2014 08:36:44 +0000 (09:36 +0100)] 
a more descriptive comment of the listener reloading flow

8 years agoexport couch_httpd:set_auth_handlers/0
benoitc [Mon, 13 Jan 2014 08:01:59 +0000 (09:01 +0100)] 
export couch_httpd:set_auth_handlers/0

This function wasn't exported so any changes to the
`httpf/authentication_handlers` setting wasn't effective.

8 years agoonly display sasl reports on error. be less verbose in tests
benoitc [Sun, 12 Jan 2014 19:58:30 +0000 (20:58 +0100)] 
only display sasl reports on error. be less verbose in tests

8 years agounbreak js test and display a report
benoitc [Sun, 12 Jan 2014 12:38:25 +0000 (13:38 +0100)] 
unbreak js test and display a report

8 years agomake couch_httpd a full couch application
benoitc [Sat, 11 Jan 2014 10:20:27 +0000 (11:20 +0100)] 
make couch_httpd a full couch application

With this change, the HTTP API is now handled by its own erlang
application and supervision. It also improved the way you can reload the
configuration and the modules. Now upgrading a listener or its
configuration is first removing it from the supervsion then start the
new process with the new configuration. This behaviour is similar to the
one you have in nginx.