[SERVER-27139] vote requester messaging needs refinement Created: 21/Nov/16  Updated: 06/Dec/22  Resolved: 09/Apr/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Replication Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-46107 Manual conversion of logs Closed
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

Due to the logic in VoteRequester::Algorithm::processResponse(), log messages can be strung together erroneously, as in the following example:

[js_test:query_config] 2016-10-13T17:07:32.254+0000 c20762| 2016-10-13T17:07:32.253+0000 I REPL     [ReplicationExecutor] VoteRequester(term 0 dry run) received an invalid response from ip-10-169-236-36:20763: BadValue: Unexpected field info in ReplSetRequestVotesreceived a no vote from ip-10-169-236-36:20763 with reason ""; response message: { info: "run rs.initiate(...) if not yet done for the set", ok: 0.0, errmsg: "no replset config has been received", code: 94, codeName: "NotYetInitialized" }

This log message ought to end at "ReplSetRequestVotes", but instead falls through into the "received a no vote..." erroneously. The trailing "response message:" is, however, correct.



 Comments   
Comment by Siyuan Zhou [ 09/Apr/20 ]

With JSON logging, I think this has been addressed in SERVER-46107. Now the message is constructed with:

    if (!status.isOK()) {
        logAttrs.add("failReason", "received an invalid response"_sd);
        logAttrs.add("error", status);
        logAttrs.add("from", request.target);
        logAttrs.add("message", response.data);
        return;
    }

Closing as duplicated.

Generated at Thu Feb 08 04:14:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.