Skip to content

Commit

Permalink
RATIS-1856. Notify apply index change of all RaftLog entries (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
SzyWilliam committed Jul 16, 2023
1 parent 3f354a2 commit ec967e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ private MemoizedSupplier<List<CompletableFuture<Message>>> applyLog() throws Raf
if (f != null) {
futures.get().add(f);
f.thenAccept(m -> notifyAppliedIndex(incremented));
} else {
notifyAppliedIndex(incremented);
}
} else {
LOG.debug("{}: logEntry {} is null. There may be snapshot to load. state:{}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ private void waitAndIncrement() {
}

private void timeoutIncrement() {
sleepQuietly(2500);
sleepQuietly(5000);
increment();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.ratis;

import org.apache.ratis.client.RaftClient;
import org.apache.ratis.client.RaftClientConfigKeys;
import org.apache.ratis.conf.RaftProperties;
import org.apache.ratis.protocol.Message;
import org.apache.ratis.protocol.RaftClientReply;
Expand Down Expand Up @@ -71,6 +72,7 @@ public void setup() {
RaftServerConfigKeys.Rpc.setTimeoutMin(p, TimeDuration.valueOf(3, TimeUnit.SECONDS));
RaftServerConfigKeys.Rpc.setTimeoutMax(p, TimeDuration.valueOf(6, TimeUnit.SECONDS));
RaftServerConfigKeys.Rpc.setRequestTimeout(p, TimeDuration.valueOf(10, TimeUnit.SECONDS));
RaftClientConfigKeys.Rpc.setRequestTimeout(p, TimeDuration.valueOf(10, TimeUnit.SECONDS));
}

@Test
Expand Down

0 comments on commit ec967e5

Please sign in to comment.