Skip to content

Commit

Permalink
HDDS-11623. Improve OM Ratis Configuration change log message (apache…
Browse files Browse the repository at this point in the history
harryteng9527 authored Nov 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2b1524b commit c045839
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -215,8 +215,15 @@ public void notifyConfigurationChanged(long term, long index,
RaftProtos.RaftConfigurationProto newRaftConfiguration) {
List<RaftProtos.RaftPeerProto> newPeers =
newRaftConfiguration.getPeersList();
LOG.info("Received Configuration change notification from Ratis. New Peer" +
" list:\n{}", newPeers);
final StringBuilder logBuilder = new StringBuilder(1024)
.append("notifyConfigurationChanged from Ratis: term=").append(term)
.append(", index=").append(index)
.append(", New Peer list: ");
newPeers.forEach(peer -> logBuilder.append(peer.getId().toStringUtf8())
.append("(")
.append(peer.getAddress())
.append("), "));
LOG.info(logBuilder.substring(0, logBuilder.length() - 2));

List<String> newPeerIds = new ArrayList<>();
for (RaftProtos.RaftPeerProto raftPeerProto : newPeers) {

0 comments on commit c045839

Please sign in to comment.