diff options
author | Robert Newson <rnewson@apache.org> | 2018-07-23 13:17:50 +0100 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2018-07-23 15:30:43 +0100 |
commit | 0c0669030bcce94e835670d9cac4cc7dcb937563 (patch) | |
tree | dfc49215873c30922743b018968410f61d365399 | |
parent | cf136e90c0c210a647289125f43ae5741f0a88d9 (diff) | |
download | couchdb-0c0669030bcce94e835670d9cac4cc7dcb937563.tar.gz |
hackish idempotency
-rw-r--r-- | src/couch_mrview/include/couch_mrview.hrl | 1 | ||||
-rw-r--r-- | src/couch_mrview/src/couch_mrview_util.erl | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/couch_mrview/include/couch_mrview.hrl b/src/couch_mrview/include/couch_mrview.hrl index 094b1d5f3..a3ba4b667 100644 --- a/src/couch_mrview/include/couch_mrview.hrl +++ b/src/couch_mrview/include/couch_mrview.hrl @@ -88,6 +88,7 @@ conflicts, callback, sorted = true, + updated = false, partitioned, partition, extra = [] diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl index 57168bae8..8d3986169 100644 --- a/src/couch_mrview/src/couch_mrview_util.erl +++ b/src/couch_mrview/src/couch_mrview_util.erl @@ -577,6 +577,9 @@ validate_args(Args) -> Args. +update_args(#mrargs{updated=true} = Args, _Options) -> % hackish idempotencies + Args; + update_args(#mrargs{} = Args, Options) -> GroupLevel = determine_group_level(Args), @@ -597,7 +600,8 @@ update_args(#mrargs{} = Args, Options) -> end_key_docid=EKDocId, group_level=GroupLevel }, - partition_mrargs(Args1, Options). + Args2 = partition_mrargs(Args1, Options), + Args2#mrargs{updated = true}. validate_and_update_args(#mrargs{} = Args) -> |