You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2023/01/10 05:36:03 UTC

[GitHub] [couchdb] jaydoane opened a new pull request, #4363: Fix replication _scheduler/docs total_rows

jaydoane opened a new pull request, #4363:
URL: https://github.com/apache/couchdb/pull/4363

   
   
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   The total_rows property was decremented by one to account for the VDU that was automatically added to the total. Now that a BDU has replaced the VDU [1] total_rows is one less than it should be.
   
   This removes the decrement so that total_rows equals the actual doc count.
   
   [1] https://github.com/apache/couchdb/pull/4274
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provide any behaviour that the end users
        could notice? -->
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affect multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected branches
   


-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] big-r81 commented on a diff in pull request #4363: Fix replication _scheduler/docs total_rows

Posted by GitBox <gi...@apache.org>.
big-r81 commented on code in PR #4363:
URL: https://github.com/apache/couchdb/pull/4363#discussion_r1065369388


##########
src/couch_replicator/src/couch_replicator_httpd_util.erl:
##########
@@ -158,7 +158,7 @@ docs_cb({meta, Meta}, #vacc{meta_sent = false, row_sent = false} = Acc) ->
     Parts =
         case couch_util:get_value(total, Meta) of
             undefined -> [];
-            Total -> [io_lib:format("\"total_rows\":~p", [adjust_total(Total)])]
+            Total -> [io_lib:format("\"total_rows\":~p", [Total])]

Review Comment:
   Hi Jay,
   
   is there a reason why we use io_lib:format instead couch_log: here?



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] jaydoane commented on a diff in pull request #4363: Fix replication _scheduler/docs total_rows

Posted by GitBox <gi...@apache.org>.
jaydoane commented on code in PR #4363:
URL: https://github.com/apache/couchdb/pull/4363#discussion_r1065403901


##########
src/couch_replicator/src/couch_replicator_httpd_util.erl:
##########
@@ -158,7 +158,7 @@ docs_cb({meta, Meta}, #vacc{meta_sent = false, row_sent = false} = Acc) ->
     Parts =
         case couch_util:get_value(total, Meta) of
             undefined -> [];
-            Total -> [io_lib:format("\"total_rows\":~p", [adjust_total(Total)])]
+            Total -> [io_lib:format("\"total_rows\":~p", [Total])]

Review Comment:
   Yes, because it's not actually doing I/O here, but just [formatting the string](https://www.erlang.org/doc/man/io_lib.html#format-2). Are you thinking of `io:format/2` maybe?



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] jaydoane merged pull request #4363: Fix replication _scheduler/docs total_rows

Posted by GitBox <gi...@apache.org>.
jaydoane merged PR #4363:
URL: https://github.com/apache/couchdb/pull/4363


-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] big-r81 commented on a diff in pull request #4363: Fix replication _scheduler/docs total_rows

Posted by GitBox <gi...@apache.org>.
big-r81 commented on code in PR #4363:
URL: https://github.com/apache/couchdb/pull/4363#discussion_r1065462579


##########
src/couch_replicator/src/couch_replicator_httpd_util.erl:
##########
@@ -158,7 +158,7 @@ docs_cb({meta, Meta}, #vacc{meta_sent = false, row_sent = false} = Acc) ->
     Parts =
         case couch_util:get_value(total, Meta) of
             undefined -> [];
-            Total -> [io_lib:format("\"total_rows\":~p", [adjust_total(Total)])]
+            Total -> [io_lib:format("\"total_rows\":~p", [Total])]

Review Comment:
   Ah, you are completly right! (_shakes fist at my brain... ;-)_)



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org