Skip to content

Commit

Permalink
Fix known issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanziwei committed Jan 5, 2024
1 parent f8137df commit 2af46e3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ public boolean start(final Endpoint addr, final int priority) throws Exception {
return this.start(addr, false, 300, false, null, null, priority);
}

public boolean startWithFlexible(final Endpoint addr, final int readFactor, final int writeFactor)
throws Exception {
public boolean startWithFlexible(final Endpoint addr, final int readFactor, final int writeFactor) throws Exception {
return this.start(addr, false, 300, false, readFactor, writeFactor, null, null);
}

Expand All @@ -155,7 +154,7 @@ public boolean startLearner(final PeerId peer) throws Exception {
}

public boolean startLearnerWithFlexible(final PeerId peer, final int readFactor, final int writeFactor)
throws Exception {
throws Exception {
this.learners.add(peer);
return this.start(peer.getEndpoint(), false, 300, false, readFactor, writeFactor, null, null);
}
Expand Down Expand Up @@ -304,7 +303,7 @@ public boolean start(final Endpoint listenAddr, final boolean emptyPeers, final
nodeOptions.setInitialConf(initConf);
}

if (readFactor!=0 && writeFactor!=0) {
if (readFactor != 0 && writeFactor != 0) {
nodeOptions.enableFlexibleRaft(true);
nodeOptions.setFactor(readFactor, writeFactor);
}
Expand Down

0 comments on commit 2af46e3

Please sign in to comment.