This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch rebase/access-2023
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 5e19c4bcad8f04f6957afa4df837392b80f50496
Author: Jan Lehnardt <[email protected]>
AuthorDate: Sat Jul 8 16:03:44 2023 +0200

    Revert "chore: remove debug code"
    
    This reverts commit 576c90f0596566a76614f1f581c6ecc7dceeb753.
---
 src/couch_replicator/src/couch_replicator.erl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/couch_replicator/src/couch_replicator.erl 
b/src/couch_replicator/src/couch_replicator.erl
index 062268e60..b15fd6442 100644
--- a/src/couch_replicator/src/couch_replicator.erl
+++ b/src/couch_replicator/src/couch_replicator.erl
@@ -79,7 +79,15 @@ replicate(PostBody, Ctx) ->
             check_authorization(RepId, UserCtx),
             {ok, Listener} = rep_result_listener(RepId),
             % TODO: review why we need this
-            Result = do_replication_loop(Rep),
+            Result =
+                case do_replication_loop(Rep) of
+                    {ok, {ResultJson}} ->
+                        % TODO: check with options
+                        {PublicRepId, _} = 
couch_replicator_ids:replication_id(Rep),
+                        {ok, {[{<<"replication_id">>, ?l2b(PublicRepId)} | 
ResultJson]}};
+                    Else ->
+                        Else
+                end,
             couch_replicator_notifier:stop(Listener),
             Result
     end.

Reply via email to