Details
Description
In parts of the code:
|
if (_lastResponse.getState() != MemberState::RS_DOWN)
|
{ log() << "Member " << _hostAndPort.toString() << " is now in state RS_DOWN - " << redact(heartbeatMessage) << rsLog;
|
}
|
In others we use toString:
// Log if the state changes
|
if (_lastResponse.getState() != hbResponse.getState())
|
{ log() << "Member " << _hostAndPort.toString() << " is now in state " << hbResponse.getState().toString() << rsLog;
|
}
|
The second example will display the official state name from the docs wheras the first uses RS_DOWN. Other part in the same file says RS_UNKNOWN which should be UNKNOWN. The RS_ prefix is the enum label.
Since this is already inconsistent I don't see any major compatibility risks in fixing this.