nickva commented on code in PR #4862:
URL: https://github.com/apache/couchdb/pull/4862#discussion_r1442283064
##########
src/couch/src/couch_changes.erl:
##########
@@ -368,6 +395,17 @@ open_revs(Db, DocInfo, Style) ->
OpenResults = [couch_db:open_doc(Db, DI, OpenOpts) || DI <- DocInfos],
[Doc || {ok, Doc} <- OpenResults].
+open_revs2(Db, DocInfo) ->
+ DocInfos = [DocInfo#doc_info{revs = [R]} || R <- DocInfo#doc_info.revs],
+ OpenOpts = [deleted, conflicts],
+ OpenResults = [couch_db:open_doc(Db, DI, OpenOpts) || DI <- DocInfos],
+ Docs = [Doc || {ok, Doc} <- OpenResults],
+ [Doc1 | RestDocs] = Docs,
+ RestRevs = [Doc#doc.revs || Doc <- RestDocs],
+ Conflicts = [{conflicts, [{Pos, RevId} || {Pos, [RevId]} <- RestRevs]}],
Review Comment:
Wonder if this will add in deleted conflicts as well. Not sure if we have a
test case to check for live vs deleted conflicts but I think we should ensure
we follow the exact previous behavior if we emitted deleted conflicts, I think
this would work but if we didn't previously we'd be breaking the API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]