Adam Kocoloski [Thu, 28 Apr 2016 19:12:44 +0000 (15:12 -0400)]
Add a finalize step after rereduce
Currently this is a noop for every reduce function except the HLL
cardinately estimator implemented in _distinct.
COUCHDB-2971
Nick Vatamaniuc [Wed, 22 Feb 2017 02:22:54 +0000 (21:22 -0500)]
Merge remote-tracking branch 'cloudant/couchdb-3302'
Closes #89
Nick Vatamaniuc [Tue, 21 Feb 2017 22:46:57 +0000 (17:46 -0500)]
Prevent attachment upload from timing out during update_docs fabric call
Currently if an attachment was large enough or the connection was slow enough
such that it took more than fabric.request_timeout = 60000 milliseconds, the
fabric request would time out during attachment data transfer from coordinator
node to other nodes and the whole request would fail.
This was most evident when replicating database with large attachments.
The fix is to periodically send `attachment_chunk_received` to coordinator to
prevent the timeout.
COUCHDB-3302
Tony Sun [Fri, 10 Feb 2017 19:23:07 +0000 (11:23 -0800)]
Use RealReplyCount to distinguish worker replies and invalid docs
We use {ok, []} in couch_db:open_doc_revs_int/3 as a return value
when the document does not exist and open_revs=all. This leads to an
incorrect all_workers_died error. We use ReplyCount and RealReplyCount
to distinguish between when no workers were actually used in a reply
versus when the document does not exist
COUCHDB-3113
Tony Sun [Wed, 1 Feb 2017 04:47:13 +0000 (20:47 -0800)]
Add Else Clause For Embed Doc
When open_doc or open_revs return an error, we set the doc value
to be an error message. This way we account for errors rather than
transform_row throwing a function_clause.
COUCHDB-3109
Tony Sun [Wed, 25 Jan 2017 21:47:00 +0000 (13:47 -0800)]
Return error when workers crash
Currently, when one worker survives in fabric_open_revs, we return that
as the response. However, when all workers crash, we still return
{ok, []}. This changes the response to an error.
COUCHDB-3113
Eric Avdey [Tue, 24 Jan 2017 17:25:41 +0000 (13:25 -0400)]
Add admin ctx on open ddoc in group_info
Nick Vatamaniuc [Thu, 12 Jan 2017 18:50:20 +0000 (13:50 -0500)]
In open_revs, do not count errors in quorum threshold calculation
Previously quorum check looked just at the number of replies and decided quorum
was met even if it only received errors. For example, if 2 nodes are in
maintance mode it might receive this sequence of replies:
`rexi_EXIT, rexi_EXIT, ok`
In that case after the first two it would decide quorum (r=2) was met, return
what it had so far ([]) and kill the remaining worker, who was about to return
a valid revision.
The fix is to keep track of error replies and subtract them when deciding if
quorum was met.
COUCHDB-3271
Nick Vatamaniuc [Thu, 12 Jan 2017 18:17:52 +0000 (13:17 -0500)]
Fix open_revs fabric eunit test
In check_workers_error_skipped last worker should be w3 not w2.
COUCHDB-3271
Robert Newson [Mon, 9 Jan 2017 12:30:02 +0000 (12:30 +0000)]
Handle no_pass message when limit is 0
A view query that uses both a filter and a limit value can appear to
'hang' because the workers continue to run even after the number of
requested items have been returned, as workers that find no more
matches return 'no_pass' messages not 'change' messages, and thus the
short-circuiting code is never activated.
COUCHDB-3269
Robert Newson [Tue, 3 Jan 2017 13:22:41 +0000 (13:22 +0000)]
Merge remote-tracking branch 'willholley/3264-alldocs-keys-conflicts'
Will Holley [Tue, 3 Jan 2017 09:54:30 +0000 (09:54 +0000)]
Include conflicts parameter in doc_options
When a keys array is passed to _all_docs, fabric translates this
to individual open_doc calls. The conflicts=true query parameter is
specified as a view-level option and is not, by default, parsed as
an option that should be passed to open_doc.
As a workaround, explicitly copy the view-level conflict parameter into
the document options before open_doc is called.
An alternative approach would be to address this when the query
parameters are parsed, setting conflicts=true in both #mrargs and
detail of fabric, I elected to make the change here instead.
Fixes #COUCHDB-3264
ILYA Khlopotov [Thu, 17 Nov 2016 17:49:24 +0000 (09:49 -0800)]
Merge remote branch 'cloudant:77984-fixup'
This closes #80
Signed-off-by: ILYA Khlopotov <iilyak@apache.org>
ILYA Khlopotov [Thu, 17 Nov 2016 17:44:31 +0000 (09:44 -0800)]
Use upgraded #mrargs{} instead of old one
ILYA Khlopotov [Wed, 16 Nov 2016 22:06:06 +0000 (14:06 -0800)]
Merge remote branch 'cloudant:fix-typespecs'
This closes #79
Signed-off-by: ILYA Khlopotov <iilyak@apache.org>
ILYA Khlopotov [Wed, 16 Nov 2016 21:57:29 +0000 (13:57 -0800)]
Add `{error, Reason}` to typespecs
`fabric:design_docs/1` and `all_docs/5` can return `{error, Reason}`
ILYA Khlopotov [Tue, 15 Nov 2016 00:21:11 +0000 (16:21 -0800)]
Merge remote branch 'cloudant:77984-upgrade-mrargs-record-phase2'
This closes #78
Signed-off-by: ILYA Khlopotov <iilyak@apache.org>
ILYA Khlopotov [Mon, 14 Nov 2016 21:17:12 +0000 (13:17 -0800)]
Revert "Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'""
This reverts commit
a8e0e9549bb2a1181538ae433f1de78abadc41d5.
Note: Re-aplying previously reverted merge
ILYA Khlopotov [Mon, 14 Nov 2016 21:17:09 +0000 (13:17 -0800)]
Upgrade #mrargs{} record
ILYA Khlopotov [Tue, 15 Nov 2016 00:02:33 +0000 (16:02 -0800)]
Merge remote branch 'cloudant:77984-upgrade-mrargs-record-phase1'
This closes #77
Signed-off-by: ILYA Khlopotov <iilyak@apache.org>
ILYA Khlopotov [Mon, 14 Nov 2016 21:13:11 +0000 (13:13 -0800)]
Compatibility clause for the record upgrade
ILYA Khlopotov [Mon, 14 Nov 2016 21:10:39 +0000 (13:10 -0800)]
Revert "Merge remote-tracking branch 'banjiewen/stale-stable-update'"
This reverts commit
508122c52731a9eac3e83f8d727f2355f019fe1f, reversing
changes made to
d68a00fdeba9113bd1a3dd41d8e546b05bb2e533.
Robert Newson [Fri, 11 Nov 2016 23:29:05 +0000 (18:29 -0500)]
Merge remote-tracking branch 'cloudant/3232-all-docs-ctx'
Paul J. Davis [Fri, 11 Nov 2016 19:15:09 +0000 (13:15 -0600)]
Merge branch 'COUCHDB-3234-open-shard-timeout-counter'
Paul J. Davis [Fri, 11 Nov 2016 17:34:11 +0000 (11:34 -0600)]
Track open_shard timeouts with a counter
The open_shard RPC endpoint is used to grab security docs. There are
fairly aggressive timeouts on these requests so that when a node is too
busy it'll try the next shard. Rather than log everytime these fail
(which can be substantial under load) lets just use a counter that can
be graphed and alerted on.
COUCHDB-3234
Robert Newson [Fri, 11 Nov 2016 04:45:14 +0000 (23:45 -0500)]
Pass user_ctx down to fabric_rpc
The Options array in fabric_view_all_docs contains the {user_ctx, _}
tuple but we omitted to pass it down to the open_doc command. This
caused several incorrect behaviours for the _users database which has
some special properties for privacy reasons.
COUCHDB-3232
Nick Vatamaniuc [Thu, 2 Jun 2016 21:16:33 +0000 (17:16 -0400)]
Add optional `fields` to change feed selectors
When using selectors with `include_docs=true` can specify an optional fields
array in the POST request JSON body.
Each element in the array can be a json field (or even a key path
specified as field1.field2...). Resulting documents will contain only the
specified document fields.
For example:
```
http://.../d1/_changes?filter=_selector&include_docs=true
{
"selector": {"z" : {"$gte" : 1} }, "fields": ["field1", "field2"]
}
```
Will first select only document with "z" value >= 1, then will return only field1 and field2 in documents.
```{ "field1": "field1value", "field2": "field2value"}```
(This is a companion pr. Main pr is in couch repo)
Jira: COUCHDB-2988
Robert Newson [Thu, 6 Oct 2016 18:00:41 +0000 (19:00 +0100)]
Merge remote-tracking branch 'banjiewen/stale-stable-update'
Robert Newson [Wed, 5 Oct 2016 22:35:52 +0000 (23:35 +0100)]
Fix function clause introduced by fix for COUCHDB-3150
Paul J. Davis [Tue, 4 Oct 2016 21:27:12 +0000 (16:27 -0500)]
Merge branch '3178-fix-fabric-rpc-filtered-changes'
Paul J. Davis [Tue, 4 Oct 2016 20:12:38 +0000 (15:12 -0500)]
Send a message when filtering a changes row
We managed to miss this change during the great merge as it was a
confusing mess in the cloudant/fabric repository. Its obvious in
hindsight once you see that we have a
`fabric_view_changes:handle_message/3` clause to handle the message.
COUCHDB-3178
Jay Doane [Thu, 29 Sep 2016 21:36:43 +0000 (14:36 -0700)]
Fix compiler warning
Paul J. Davis [Wed, 28 Sep 2016 17:27:10 +0000 (12:27 -0500)]
Merge remote-tracking branch 'cloudant/COUCHDB-3150-update-all-shards-stale-update-after'
brkolla [Wed, 21 Sep 2016 18:29:15 +0000 (14:29 -0400)]
Update all shards with stale=update_after
Trigger an update for all the shards. Will send a message to trigger
an update to shards that won't participate in the response due to not
being a ushard.
COUCHDB-3150
Nick Vatamaniuc [Thu, 15 Sep 2016 15:16:19 +0000 (11:16 -0400)]
Avoid throwing exception when deleting db in db updater listener
Handle db deletion explicitly. Previously handle_db_event callback returned
`{stop, St}`. That return value was not handled by the caller, instead it
resulted in it being used as reason in an erlang:error, which then ended up in
the log.
Jira: COUCHDB-3149
Robert Newson [Thu, 8 Sep 2016 18:05:24 +0000 (19:05 +0100)]
Merge remote-tracking branch 'will/all_or_nothing_error'
Robert Newson [Wed, 7 Sep 2016 17:56:14 +0000 (18:56 +0100)]
End continuous changes feeds cleanly if database is deleted
COUCHDB-3132
Will Holley [Wed, 7 Sep 2016 16:10:05 +0000 (17:10 +0100)]
clarify error when all_or_nothing attempted
change the error message so that it doesn't imply
that all_or_nothing is a feature that will be
implemented in the future.
Robert Newson [Thu, 11 Aug 2016 11:27:19 +0000 (12:27 +0100)]
Merge remote-tracking branch 'cloudant/2779-view-cleanup-cluster-aware'
Robert Newson [Thu, 11 Aug 2016 09:49:26 +0000 (10:49 +0100)]
Implement clustered compaction functions
COUCHDB-3099
Eric Avdey [Tue, 9 Aug 2016 18:36:53 +0000 (15:36 -0300)]
Merge remote branch 'cloudant:71693-fix-filter-out-not-found'
This closes #65
Signed-off-by: Eric Avdey <eiri@eiri.ca>
Eric Avdey [Tue, 9 Aug 2016 14:01:51 +0000 (11:01 -0300)]
Fix reply filter for open_revs
In general, in an absence of latest attribute, we expect
one reply per passed in revision which could be either
doc or not found.
This fix's making sure that we are removing not_found's
only for the revisions that also have {ok, Doc} reply.
COUCHDB-3097
Benjamin Anderson [Sun, 17 Jul 2016 21:46:54 +0000 (14:46 -0700)]
Replace "stale" with "stable" when picking shards
COUCHDB-3063
Eric Avdey [Tue, 12 Jul 2016 18:23:09 +0000 (15:23 -0300)]
Merge remote branch 'cloudant:69654-fix-view-info-duplicates'
This closes #61
Signed-off-by: Eric Avdey <eiri@eiri.ca>
Eric Avdey [Fri, 8 Jul 2016 18:54:47 +0000 (15:54 -0300)]
Ignore already received replies for same shards
It is possible to get a reply for same shard
from different node sent before its collector
get stopped in remove_overlapping_shards.
This running condition leads to a possibility
of same info to be aggregated multiple times.
Robert Newson [Tue, 12 Jul 2016 14:04:23 +0000 (15:04 +0100)]
fix compilation warnings of unused variables
Robert Newson [Tue, 12 Jul 2016 11:06:24 +0000 (12:06 +0100)]
End the listener if any shard is deleted
If a database is deleted and recreated the underlying shards have a
new name. Since we're watching the old names, we will never again see
an updated event. So, we stop this process if any watched shard is
deleted and it's someone elses job to recreate the listener for the
new shards.
COUCHDB-3054
ILYA Khlopotov [Mon, 11 Jul 2016 19:43:39 +0000 (12:43 -0700)]
Merge remote branch 'cloudant:44287-use-correct-sequence-for-shard-replacement'
This closes #62
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
Paul J. Davis [Wed, 11 Feb 2015 03:49:40 +0000 (21:49 -0600)]
Use the correct sequence for shard replacement
The call to unpack the since sequence for _changes incorrectly filtered
the value for any shard that didn't exist. This means that any shard
that was moved ended up requiring a complete rescan which is a bug. This
just sets the update sequence to the range of the shard being replaced
rather than zero.
COUCHDB-3055
ILYA Khlopotov [Mon, 27 Jun 2016 23:21:27 +0000 (16:21 -0700)]
Merge remote branch 'cloudant:fix_some_specs'
This closes #60
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Wed, 22 Jun 2016 17:35:07 +0000 (10:35 -0700)]
Improve fabric:all_docs spec
- fabric:all_docs supports options passed as proplist
- fabric:all_docs return value is controled by a callback therefore it
should be `{ok, any()}`
ILYA Khlopotov [Wed, 22 Jun 2016 17:34:52 +0000 (10:34 -0700)]
fabric:update_docs supports json_obj()
Nick Vatamaniuc [Fri, 17 Jun 2016 18:04:39 +0000 (14:04 -0400)]
Emit error row for a null doc id in POSTs to _all_docs
This is compatible behavior with CouchDB 1.x
Jira: COUCHDB-3039
BugzID: 68486
Robert Newson [Wed, 22 Jun 2016 12:34:14 +0000 (13:34 +0100)]
Support update_seq=true in reduce views
COUCHDB-2991
Robert Newson [Tue, 21 Jun 2016 20:14:07 +0000 (21:14 +0100)]
Support update_seq=true in _all_docs
Robert Newson [Tue, 21 Jun 2016 15:00:08 +0000 (16:00 +0100)]
Pass security object in fake db
Users can be granted admin access to the special _users and
_replicator databases so we need to pass the security object to the
authorization functions.
COUCHDB-2991
Eric Avdey [Wed, 15 Jun 2016 12:26:31 +0000 (09:26 -0300)]
Merge remote branch 'cloudant:fix-doc-open-reply'
This closes #58
Signed-off-by: Eric Avdey <eiri@eiri.ca>
Eric Avdey [Tue, 14 Jun 2016 16:10:04 +0000 (13:10 -0300)]
Fix match in fabric_doc_open_revs reply
Message handler in fabric_doc_open_revs returns tagged with 'ok'
list of the replies and not expected {ok, Reply} tuple. This makes
reply to go through 'Else' clause and skip filter_reply function.
ILYA Khlopotov [Mon, 13 Jun 2016 18:20:06 +0000 (11:20 -0700)]
Merge remote branch 'cloudant:68151-fix-rexi_DOWN-handler'
This closes #57
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Mon, 13 Jun 2016 16:19:03 +0000 (09:19 -0700)]
Fix rexi_DOWN and rexi_EXIT handlers
In the cases when we receive rexi_DOWN or rexi_EXIT we call
handle_message with {ok, []}. This crashes lists:min/1. Since it expects
a list with at least one element.
COUCHDB-3037
Paul J. Davis [Fri, 10 Jun 2016 20:41:37 +0000 (15:41 -0500)]
Merge branch '3036-fix-fabric-db-update-listener-rexi-down'
Paul J. Davis [Fri, 10 Jun 2016 17:52:42 +0000 (12:52 -0500)]
Fix fabric_db_update_listener rexi_DOWN handling
A recent change that fixed the list comprehension ended up uncovering
the fact that we don't handle rexi_DOWN errors properly. This patch just
tracks the shards that are still listening and uses
`fabric_view:is_progress_possible/1` to know if we are still able to
continue listening for changes.
Fixes COUCHDB-3036
ILYA Khlopotov [Sun, 5 Jun 2016 15:46:10 +0000 (08:46 -0700)]
Merge remote branch 'cloudant:2730-fix-compilation-warnings'
This closes #54
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Thu, 2 Jun 2016 17:43:03 +0000 (10:43 -0700)]
Fix compilation warnings
COUCHDB-2730
ILYA Khlopotov [Thu, 2 Jun 2016 17:14:51 +0000 (10:14 -0700)]
Merge remote branch 'cloudant:67266-filter-out-not-found'
This closes #53
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Thu, 2 Jun 2016 16:20:39 +0000 (09:20 -0700)]
Filter out not_found replies when #doc{} is found
There are places in the codebase which assume that the return from
open_revs is always a list with one element in it. Fix the regression
introduced in
9a1d0c5 by filtering out not_found replies when any of the
returns contains #doc{}.
COUCHDB-3026
ILYA Khlopotov [Tue, 24 May 2016 23:14:47 +0000 (16:14 -0700)]
Merge remote branch 'cloudant:use_meck_wait'
This closes #52
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Tue, 24 May 2016 22:52:25 +0000 (15:52 -0700)]
Use meck:wait to fix race condition
fabric:update_docs is running in the context of a `read_repair` which is an
independent process started using `erlang:spawn/1`. This leads to a race
when we try to use `meck:history(fabric)`. Use of `meck:wait` ensures that
we call `meck:history` after `fabric:update_docs` has been called.
Paul J. Davis [Tue, 24 May 2016 16:57:48 +0000 (11:57 -0500)]
Merge branch '2863-fix-fabric-doc-open-revs'
ILYA Khlopotov [Thu, 19 May 2016 12:04:59 +0000 (05:04 -0700)]
Merge remote branch 'cloudant:fix-spec-for-get_all_security'
This closes #51
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Wed, 18 May 2016 23:39:09 +0000 (16:39 -0700)]
Fix return type in get_all_security
ILYA Khlopotov [Wed, 18 May 2016 14:48:29 +0000 (07:48 -0700)]
Merge remote branch 'cloudant:43260-create-target-shard-if-missing'
This closes #50
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Tue, 17 May 2016 23:57:16 +0000 (16:57 -0700)]
Use create_if_missing option of couch_db:open_int
Paul J. Davis [Thu, 21 Apr 2016 20:42:27 +0000 (15:42 -0500)]
Fix fabric_doc_open_revs
When a user specified multiple revisions on a single branch to
fabric_doc_open_revs it would throw a function clause exception in
lists:zipwith/3. This was due to a bad assumption that there would only
ever be exactly one revision for every input revision.
Due to the possibility of having zero or more revisions for a given
revision when using latest=true this code had to be changed fairly
significantly.
COUCHDB-2863
ILYA Khlopotov [Tue, 3 May 2016 15:29:50 +0000 (08:29 -0700)]
Merge remote branch 'cloudant:update-get_doc_count-spec'
This closes #49
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Tue, 3 May 2016 13:57:49 +0000 (06:57 -0700)]
Improve fabric:get_doc_count spec
ILYA Khlopotov [Tue, 3 May 2016 13:18:28 +0000 (06:18 -0700)]
Merge remote branch 'cloudant:fix-db_update_listener'
This closes #48
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Tue, 3 May 2016 01:01:28 +0000 (18:01 -0700)]
start_update_notifiers returns list of #worker{}
start_update_notifiers returns list of #workers{}. However we expect
`{Node, Reference}`.
ILYA Khlopotov [Tue, 19 Apr 2016 21:49:51 +0000 (14:49 -0700)]
Merge remote branch 'github/pr/45'
This closes #45
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
ILYA Khlopotov [Fri, 8 Apr 2016 17:18:42 +0000 (10:18 -0700)]
Use couch_db:dbname_suffix in path_ends_with
Replace couch_db:normalize_dbname with couch_db:dbname_suffix since the
semantic of normalize_dbname has been changed. couch_db:normalize_dbname
would return all components of the path with shard info removed from it.
couch_db:dbname_suffix on the other hand would return the last component
of the path. It would also ensure that shard's suffix is removed from
the result.
COUCHDB-2983
Robert Newson [Sun, 17 Apr 2016 18:18:16 +0000 (19:18 +0100)]
Honor update_seq=true for map view requests
COUCHDB-2849
Benjamin Anderson [Thu, 24 Mar 2016 06:09:23 +0000 (23:09 -0700)]
Use ICU to compare POSTed view keys when necessary
It's possible for user-supplied view keys to compare equal under ICU
collation but not under Erlang's =:=. Since dict uses =:= for equality
this will result in runtime errors unless we fall back to ICU when
necessary and appropriate.
COUCHDB-2932
Benjamin Anderson [Thu, 24 Mar 2016 06:03:54 +0000 (23:03 -0700)]
Support raw collation in map results
COUCHDB-2900
Benjamin Anderson [Wed, 16 Mar 2016 05:17:41 +0000 (22:17 -0700)]
Support raw collation in reduce results
Also simplify find_next_key/3 and avoid generating a new fun for every
streamed key.
COUCHDB-2900
Benjamin Anderson [Wed, 16 Mar 2016 05:12:42 +0000 (22:12 -0700)]
Add collation to view result collector record
There's no reference to the #mrview when results are being streamed to
the user, so we need a place to store the collation specification while
results are collected.
COUCHDB-2900
Eric Avdey [Mon, 29 Feb 2016 20:07:09 +0000 (16:07 -0400)]
Extent fetch ddoc logic for view filtered changes feeds
Mike Wallace [Thu, 3 Mar 2016 17:13:48 +0000 (17:13 +0000)]
Avoid spamming logs with write_quorum errors
The three metrics in fabric_doc_update:force_reply/3 were
introduced to replace the write_quorum log message however the
log line was not removed. This commit removes the log message.
Close COUCHDB-2958
This closes #41
ILYA Khlopotov [Wed, 2 Mar 2016 20:36:37 +0000 (12:36 -0800)]
Merge remote branch 'github/pr/39'
- https://github.com/apache/couchdb-fabric/pull/39
This closes #39
Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
Nick Vatamaniuc [Fri, 26 Feb 2016 21:11:39 +0000 (16:11 -0500)]
Remove configurable replicator db name
JIRA: COUCHDB-2954
Russell Branca [Wed, 10 Feb 2016 22:31:07 +0000 (22:31 +0000)]
Merge branch '2938-use-ddoc-cache-in-filtered-changes'
Russell Branca [Thu, 21 Jan 2016 22:55:13 +0000 (22:55 +0000)]
Support fetch ddoc logic for filtered changes feeds
Mike Wallace [Tue, 9 Feb 2016 14:31:55 +0000 (14:31 +0000)]
Return forbidden error if encountered on any shard
This commit fixes an issue which caused HTTP 500 errors to be
returned when an authorized user attempted to access a database
that they did not have permission to access, when cassim is
disabled.
Instead of returning an internal server error once all shards
have failed to open we add a receive clause so that we throw
a forbidden error if one is encountered on any shard. This is the
same approach we already take for unauthorized errors.
Closes COUCHDB-2948
This closes #38
Benjamin Bastian [Wed, 20 Jan 2016 00:29:34 +0000 (16:29 -0800)]
Add owner of shard to last_seq of changes response
Prior to this commit, there was a bug where the response of a changes
query would include epoch information for every change, but not for the
last sequence. Subsequent shard changes queries would rewind from zero
if the last_seq field was used in the clustered changes query and any
shard had previously been moved.
Alexander Shorin [Tue, 27 Oct 2015 13:55:42 +0000 (16:55 +0300)]
Fix incorrect size values for view index information
We need to filter overlapping shards to prevent summarizing
all sizes from all the shards, since we actually need the
value from the one.
This bug was introduced in
ba27f81.
Alexander Shorin [Wed, 7 Oct 2015 17:57:02 +0000 (20:57 +0300)]
Update .travis.yml
Nick Vatamaniuc [Fri, 2 Oct 2015 18:47:10 +0000 (14:47 -0400)]
Fix eunit tests.
Mock couch_log alongside couch_stats.
Robert Newson [Tue, 22 Sep 2015 13:18:07 +0000 (14:18 +0100)]
fix assertions: first arg is 'expected'
Robert Newson [Tue, 22 Sep 2015 12:10:23 +0000 (13:10 +0100)]
Don't create dbs doc if shard files fail for enametoolong reason
COUCHDB-2821
Robert Newson [Tue, 22 Sep 2015 12:56:19 +0000 (13:56 +0100)]
Merge remote-tracking branch 'smithsz/2819-db-create-check-already-exists'
Sam Smith [Mon, 21 Sep 2015 15:05:16 +0000 (16:05 +0100)]
Check if a DB exists prior to creating
COUCHDB-2819