nickva commented on code in PR #5008:
URL: https://github.com/apache/couchdb/pull/5008#discussion_r1527412175
##########
src/couch_replicator/test/eunit/couch_replicator_scheduler_docs_tests.erl:
##########
@@ -133,9 +133,6 @@ t_scheduler_docs_total_rows({_Ctx, {RepDb, Source,
Target}}) ->
case req(get, SchedulerDocsUrl) of
{200, #{<<"docs">> := [_ | _]} = Decoded} ->
Decoded;
- {_, #{<<"error">> := Error, <<"reason">> := Reason}} ->
Review Comment:
A better improvement here might to just be precise about what responses we
expect. Instead of any map we should be explicit we wait while docs list is
empty, and then return when we have some docs. If we get an error or anything
else it should fail immediately with a bad match. I'll update it to do that.
In general, or at least in Apache CouchDB, debug logs look a bit out of
place. We usually add them temporarily until we find the issue which is causing
flakiness then remove them. Otherwise after a few years nobody knows why they
are there or if they are still needed. Here is one example for instance I added
4 years ago:
https://github.com/apache/couchdb/blob/b964a848d6ccf9494edc00466a19eed7ee6b44d1/src/mem3/src/mem3_sync_event_listener.erl#L314
no idea if it's still needed or useful at this point.
--
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]