davisp commented on a change in pull request #1789: New Feature: Database
Partitions
URL: https://github.com/apache/couchdb/pull/1789#discussion_r242674426
##########
File path: src/couch_mrview/src/couch_mrview_updater.erl
##########
@@ -382,6 +391,20 @@ write_kvs(State, UpdateSeq, ViewKVs, DocIdKeys, Seqs,
Log0) ->
log_btree=LogBtree2
}.
+inject_partition(Rows) ->
+ lists:map(fun
+ ({{Key, DocId}, Value}) ->
+ % Adding a row to the view
+ {{{p, partition(DocId), Key}, DocId}, Value};
+ ({Key, DocId}) ->
+ % Removing a row based on values in id_tree
+ {{p, partition(DocId), Key}, DocId}
+ end, Rows).
+
+partition(DocId) ->
Review comment:
Updated and uses `couch_partition:extract/1` now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services