Search in sources :

Example 61 with Node

use of org.apache.ignite.raft.jraft.Node in project ignite-3 by apache.

the class ItNodeTest method testElectionTimeoutAutoAdjustWhenBlockedMessages.

private void testElectionTimeoutAutoAdjustWhenBlockedMessages(BiPredicate<Object, String> blockingPredicate) throws Exception {
    List<PeerId> peers = TestUtils.generatePeers(4);
    int maxElectionRoundsWithoutAdjusting = 3;
    cluster = new TestCluster("unittest", dataPath, peers, new LinkedHashSet<>(), ELECTION_TIMEOUT_MILLIS, opts -> opts.setElectionTimeoutStrategy(new ExponentialBackoffTimeoutStrategy(11_000, maxElectionRoundsWithoutAdjusting)), testInfo);
    for (PeerId peer : peers) {
        assertTrue(cluster.start(peer.getEndpoint()));
    }
    cluster.waitLeader();
    Node leader = cluster.getLeader();
    int initElectionTimeout = leader.getOptions().getElectionTimeoutMs();
    LOG.warn("Current leader {}, electTimeout={}", leader.getNodeId().getPeerId(), leader.getOptions().getElectionTimeoutMs());
    List<Node> followers = cluster.getFollowers();
    for (Node follower : followers) {
        NodeImpl follower0 = (NodeImpl) follower;
        assertEquals(initElectionTimeout, follower0.getOptions().getElectionTimeoutMs());
    }
    blockMessagesOnFollowers(followers, blockingPredicate);
    LOG.warn("Stop leader {}, curTerm={}", leader.getNodeId().getPeerId(), ((NodeImpl) leader).getCurrentTerm());
    assertTrue(cluster.stop(leader.getNodeId().getPeerId().getEndpoint()));
    assertNull(cluster.getLeader());
    assertTrue(waitForCondition(() -> followers.stream().allMatch(f -> f.getOptions().getElectionTimeoutMs() > initElectionTimeout), (long) maxElectionRoundsWithoutAdjusting * // need to multiply to 2 because stepDown happens after voteTimer timeout
    (initElectionTimeout + followers.get(0).getOptions().getRaftOptions().getMaxElectionDelayMs()) * 2));
    stopBlockingMessagesOnFollowers(followers);
    // elect new leader
    cluster.waitLeader();
    leader = cluster.getLeader();
    LOG.info("Elected new leader is {}, curTerm={}", leader.getLeaderId(), ((NodeImpl) leader).getCurrentTerm());
    assertTrue(waitForCondition(() -> followers.stream().allMatch(f -> f.getOptions().getElectionTimeoutMs() == initElectionTimeout), 3_000));
}
Also used : LinkedHashSet(java.util.LinkedHashSet) SynchronizedClosure(org.apache.ignite.raft.jraft.closure.SynchronizedClosure) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) ExponentialBackoffTimeoutStrategy(org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy) TaskClosure(org.apache.ignite.raft.jraft.closure.TaskClosure) SnapshotThrottle(org.apache.ignite.raft.jraft.storage.SnapshotThrottle) Disabled(org.junit.jupiter.api.Disabled) BooleanSupplier(java.util.function.BooleanSupplier) AfterAll(org.junit.jupiter.api.AfterAll) Future(java.util.concurrent.Future) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) BeforeAll(org.junit.jupiter.api.BeforeAll) Path(java.nio.file.Path) Collections.synchronizedList(java.util.Collections.synchronizedList) Set(java.util.Set) Assertions.assertNotSame(org.junit.jupiter.api.Assertions.assertNotSame) ELECTION_TIMEOUT_MILLIS(org.apache.ignite.raft.jraft.core.TestCluster.ELECTION_TIMEOUT_MILLIS) TestUtils(org.apache.ignite.raft.jraft.test.TestUtils) ExecutorServiceHelper(org.apache.ignite.raft.jraft.util.ExecutorServiceHelper) Executors(java.util.concurrent.Executors) CountDownLatch(java.util.concurrent.CountDownLatch) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Endpoint(org.apache.ignite.raft.jraft.util.Endpoint) RaftError(org.apache.ignite.raft.jraft.error.RaftError) RpcServer(org.apache.ignite.raft.jraft.rpc.RpcServer) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) StateMachine(org.apache.ignite.raft.jraft.StateMachine) RaftException(org.apache.ignite.raft.jraft.error.RaftException) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ArrayList(java.util.ArrayList) Task(org.apache.ignite.raft.jraft.entity.Task) IgniteRpcServer(org.apache.ignite.raft.jraft.rpc.impl.IgniteRpcServer) TestScaleCubeClusterServiceFactory(org.apache.ignite.network.scalecube.TestScaleCubeClusterServiceFactory) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) LinkedHashSet(java.util.LinkedHashSet) NodeManager(org.apache.ignite.raft.jraft.NodeManager) LogIndexOutOfBoundsException(org.apache.ignite.raft.jraft.error.LogIndexOutOfBoundsException) RaftGroupService(org.apache.ignite.raft.jraft.RaftGroupService) LogNotFoundException(org.apache.ignite.raft.jraft.error.LogNotFoundException) DefaultRaftClientService(org.apache.ignite.raft.jraft.rpc.impl.core.DefaultRaftClientService) File(java.io.File) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) WorkDirectory(org.apache.ignite.internal.testframework.WorkDirectory) NetworkAddress(org.apache.ignite.network.NetworkAddress) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AfterEach(org.junit.jupiter.api.AfterEach) ConsoleReporter(com.codahale.metrics.ConsoleReporter) RaftOptions(org.apache.ignite.raft.jraft.option.RaftOptions) EnumOutter(org.apache.ignite.raft.jraft.entity.EnumOutter) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) TestUtils.sender(org.apache.ignite.raft.jraft.test.TestUtils.sender) IgniteLogger(org.apache.ignite.lang.IgniteLogger) ByteBuffer(java.nio.ByteBuffer) ReadOnlyOption(org.apache.ignite.raft.jraft.option.ReadOnlyOption) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) NodeFinder(org.apache.ignite.network.NodeFinder) Node(org.apache.ignite.raft.jraft.Node) JoinableClosure(org.apache.ignite.raft.jraft.closure.JoinableClosure) TestIgniteRpcServer(org.apache.ignite.raft.jraft.rpc.TestIgniteRpcServer) SnapshotReader(org.apache.ignite.raft.jraft.storage.snapshot.SnapshotReader) Status(org.apache.ignite.raft.jraft.Status) BootstrapOptions(org.apache.ignite.raft.jraft.option.BootstrapOptions) TestInfo(org.junit.jupiter.api.TestInfo) Utils(org.apache.ignite.raft.jraft.util.Utils) Test(org.junit.jupiter.api.Test) List(java.util.List) StaticNodeFinder(org.apache.ignite.network.StaticNodeFinder) RpcClientEx(org.apache.ignite.raft.jraft.rpc.RpcClientEx) Configuration(org.apache.ignite.raft.jraft.conf.Configuration) ReadIndexClosure(org.apache.ignite.raft.jraft.closure.ReadIndexClosure) Bits(org.apache.ignite.raft.jraft.util.Bits) ClusterServiceTestUtils(org.apache.ignite.utils.ClusterServiceTestUtils) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) FixedThreadsExecutorGroup(org.apache.ignite.raft.jraft.util.concurrent.FixedThreadsExecutorGroup) AtomicReference(java.util.concurrent.atomic.AtomicReference) NodeOptions(org.apache.ignite.raft.jraft.option.NodeOptions) HashSet(java.util.HashSet) BiPredicate(java.util.function.BiPredicate) Iterator(org.apache.ignite.raft.jraft.Iterator) ExecutorService(java.util.concurrent.ExecutorService) JRaftUtils(org.apache.ignite.raft.jraft.JRaftUtils) UTF_8(java.nio.charset.StandardCharsets.UTF_8) RpcRequests(org.apache.ignite.raft.jraft.rpc.RpcRequests) IgniteRpcClient(org.apache.ignite.raft.jraft.rpc.impl.IgniteRpcClient) TimeUnit(java.util.concurrent.TimeUnit) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Collectors.toList(java.util.stream.Collectors.toList) ThroughputSnapshotThrottle(org.apache.ignite.raft.jraft.storage.snapshot.ThroughputSnapshotThrottle) ClusterService(org.apache.ignite.network.ClusterService) WorkDirectoryExtension(org.apache.ignite.internal.testframework.WorkDirectoryExtension) UserLog(org.apache.ignite.raft.jraft.entity.UserLog) Collections(java.util.Collections) Node(org.apache.ignite.raft.jraft.Node) Endpoint(org.apache.ignite.raft.jraft.util.Endpoint) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) ExponentialBackoffTimeoutStrategy(org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy)

Example 62 with Node

use of org.apache.ignite.raft.jraft.Node in project ignite-3 by apache.

the class ItNodeTest method testNodesWithZeroValPriorityElection.

@Test
public void testNodesWithZeroValPriorityElection() throws Exception {
    List<Integer> priorities = new ArrayList<>();
    priorities.add(50);
    priorities.add(0);
    priorities.add(0);
    List<PeerId> peers = TestUtils.generatePriorityPeers(3, priorities);
    cluster = new TestCluster("unittest", dataPath, peers, testInfo);
    for (PeerId peer : peers) assertTrue(cluster.start(peer.getEndpoint(), peer.getPriority()));
    // elect leader
    cluster.waitLeader();
    // get leader
    Node leader = cluster.getLeader();
    assertNotNull(leader);
    cluster.ensureLeader(leader);
    assertEquals(3, leader.listPeers().size());
    assertEquals(2, cluster.getFollowers().size());
    assertEquals(50, leader.getNodeTargetPriority());
    assertEquals(50, leader.getLeaderId().getPriority());
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Node(org.apache.ignite.raft.jraft.Node) ArrayList(java.util.ArrayList) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Test(org.junit.jupiter.api.Test)

Example 63 with Node

use of org.apache.ignite.raft.jraft.Node in project ignite-3 by apache.

the class ItNodeTest method testInstallLargeSnapshotWithThrottle.

// TODO add test for timeout on snapshot install https://issues.apache.org/jira/browse/IGNITE-14832
@Test
@Disabled("https://issues.apache.org/jira/browse/IGNITE-16467")
public void testInstallLargeSnapshotWithThrottle() throws Exception {
    List<PeerId> peers = TestUtils.generatePeers(4);
    cluster = new TestCluster("unitest", dataPath, peers.subList(0, 3), testInfo);
    for (int i = 0; i < peers.size() - 1; i++) {
        PeerId peer = peers.get(i);
        boolean started = cluster.start(peer.getEndpoint(), false, 200, false);
        assertTrue(started);
    }
    cluster.waitLeader();
    // get leader
    Node leader = cluster.getLeader();
    assertNotNull(leader);
    cluster.ensureLeader(leader);
    // apply tasks to leader
    sendTestTaskAndWait(leader, 0, RaftError.SUCCESS);
    cluster.ensureSame();
    // apply something more
    for (int i = 1; i < 100; i++) sendTestTaskAndWait(leader, i * 10, RaftError.SUCCESS);
    Thread.sleep(1000);
    // trigger leader snapshot
    triggerLeaderSnapshot(cluster, leader);
    // apply something more
    for (int i = 100; i < 200; i++) sendTestTaskAndWait(leader, i * 10, RaftError.SUCCESS);
    // trigger leader snapshot
    triggerLeaderSnapshot(cluster, leader, 2);
    // wait leader to compact logs
    Thread.sleep(1000);
    // add follower
    PeerId newPeer = peers.get(3);
    SnapshotThrottle snapshotThrottle = new ThroughputSnapshotThrottle(128, 1);
    boolean started = cluster.start(newPeer.getEndpoint(), false, 300, false, snapshotThrottle);
    assertTrue(started);
    CountDownLatch latch = new CountDownLatch(1);
    leader.addPeer(newPeer, status -> {
        assertTrue(status.isOk(), status.toString());
        latch.countDown();
    });
    waitLatch(latch);
    cluster.ensureSame();
    assertEquals(4, cluster.getFsms().size());
    for (MockStateMachine fsm : cluster.getFsms()) assertEquals(2000, fsm.getLogs().size());
}
Also used : ThroughputSnapshotThrottle(org.apache.ignite.raft.jraft.storage.snapshot.ThroughputSnapshotThrottle) Node(org.apache.ignite.raft.jraft.Node) SnapshotThrottle(org.apache.ignite.raft.jraft.storage.SnapshotThrottle) ThroughputSnapshotThrottle(org.apache.ignite.raft.jraft.storage.snapshot.ThroughputSnapshotThrottle) CountDownLatch(java.util.concurrent.CountDownLatch) Endpoint(org.apache.ignite.raft.jraft.util.Endpoint) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 64 with Node

use of org.apache.ignite.raft.jraft.Node in project ignite-3 by apache.

the class ItNodeTest method testTripleNodesWithStaticLearners.

@Test
public void testTripleNodesWithStaticLearners() throws Exception {
    List<PeerId> peers = TestUtils.generatePeers(3);
    cluster = new TestCluster("unittest", dataPath, peers, testInfo);
    LinkedHashSet<PeerId> learners = new LinkedHashSet<>();
    PeerId learnerPeer = new PeerId(TestUtils.getLocalAddress(), TestUtils.INIT_PORT + 3);
    learners.add(learnerPeer);
    cluster.setLearners(learners);
    for (PeerId peer : peers) assertTrue(cluster.start(peer.getEndpoint()));
    // elect leader
    cluster.waitLeader();
    Node leader = cluster.getLeader();
    cluster.ensureLeader(leader);
    assertEquals(3, leader.listPeers().size());
    assertEquals(1, leader.listLearners().size());
    assertTrue(leader.listLearners().contains(learnerPeer));
    assertTrue(leader.listAliveLearners().isEmpty());
    // start learner after cluster setup.
    assertTrue(cluster.start(learnerPeer.getEndpoint()));
    Thread.sleep(1000);
    assertEquals(3, leader.listPeers().size());
    assertEquals(1, leader.listLearners().size());
    assertEquals(1, leader.listAliveLearners().size());
    // apply tasks to leader
    sendTestTaskAndWait(leader);
    cluster.ensureSame();
    assertEquals(4, cluster.getFsms().size());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) Node(org.apache.ignite.raft.jraft.Node) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Test(org.junit.jupiter.api.Test)

Example 65 with Node

use of org.apache.ignite.raft.jraft.Node in project ignite-3 by apache.

the class ItNodeTest method testTripleNodesWithReplicatorStateListener.

@Test
public void testTripleNodesWithReplicatorStateListener() throws Exception {
    List<PeerId> peers = TestUtils.generatePeers(3);
    // final TestCluster cluster = new TestCluster("unittest", this.dataPath, peers);
    UserReplicatorStateListener listener1 = new UserReplicatorStateListener();
    UserReplicatorStateListener listener2 = new UserReplicatorStateListener();
    cluster = new TestCluster("unitest", dataPath, peers, new LinkedHashSet<>(), ELECTION_TIMEOUT_MILLIS, opts -> opts.setReplicationStateListeners(List.of(listener1, listener2)), testInfo);
    for (PeerId peer : peers) assertTrue(cluster.start(peer.getEndpoint()));
    // elect leader
    cluster.waitLeader();
    cluster.ensureLeader(cluster.getLeader());
    for (Node follower : cluster.getFollowers()) waitForCondition(() -> follower.getLeaderId() != null, 5_000);
    assertEquals(4, startedCounter.get());
    assertEquals(2, cluster.getLeader().getReplicatorStateListeners().size());
    assertEquals(2, cluster.getFollowers().get(0).getReplicatorStateListeners().size());
    assertEquals(2, cluster.getFollowers().get(1).getReplicatorStateListeners().size());
    for (Node node : cluster.getNodes()) node.removeReplicatorStateListener(listener1);
    assertEquals(1, cluster.getLeader().getReplicatorStateListeners().size());
    assertEquals(1, cluster.getFollowers().get(0).getReplicatorStateListeners().size());
    assertEquals(1, cluster.getFollowers().get(1).getReplicatorStateListeners().size());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) SynchronizedClosure(org.apache.ignite.raft.jraft.closure.SynchronizedClosure) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) ExponentialBackoffTimeoutStrategy(org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy) TaskClosure(org.apache.ignite.raft.jraft.closure.TaskClosure) SnapshotThrottle(org.apache.ignite.raft.jraft.storage.SnapshotThrottle) Disabled(org.junit.jupiter.api.Disabled) BooleanSupplier(java.util.function.BooleanSupplier) AfterAll(org.junit.jupiter.api.AfterAll) Future(java.util.concurrent.Future) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) BeforeAll(org.junit.jupiter.api.BeforeAll) Path(java.nio.file.Path) Collections.synchronizedList(java.util.Collections.synchronizedList) Set(java.util.Set) Assertions.assertNotSame(org.junit.jupiter.api.Assertions.assertNotSame) ELECTION_TIMEOUT_MILLIS(org.apache.ignite.raft.jraft.core.TestCluster.ELECTION_TIMEOUT_MILLIS) TestUtils(org.apache.ignite.raft.jraft.test.TestUtils) ExecutorServiceHelper(org.apache.ignite.raft.jraft.util.ExecutorServiceHelper) Executors(java.util.concurrent.Executors) CountDownLatch(java.util.concurrent.CountDownLatch) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Endpoint(org.apache.ignite.raft.jraft.util.Endpoint) RaftError(org.apache.ignite.raft.jraft.error.RaftError) RpcServer(org.apache.ignite.raft.jraft.rpc.RpcServer) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) StateMachine(org.apache.ignite.raft.jraft.StateMachine) RaftException(org.apache.ignite.raft.jraft.error.RaftException) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ArrayList(java.util.ArrayList) Task(org.apache.ignite.raft.jraft.entity.Task) IgniteRpcServer(org.apache.ignite.raft.jraft.rpc.impl.IgniteRpcServer) TestScaleCubeClusterServiceFactory(org.apache.ignite.network.scalecube.TestScaleCubeClusterServiceFactory) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) LinkedHashSet(java.util.LinkedHashSet) NodeManager(org.apache.ignite.raft.jraft.NodeManager) LogIndexOutOfBoundsException(org.apache.ignite.raft.jraft.error.LogIndexOutOfBoundsException) RaftGroupService(org.apache.ignite.raft.jraft.RaftGroupService) LogNotFoundException(org.apache.ignite.raft.jraft.error.LogNotFoundException) DefaultRaftClientService(org.apache.ignite.raft.jraft.rpc.impl.core.DefaultRaftClientService) File(java.io.File) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) WorkDirectory(org.apache.ignite.internal.testframework.WorkDirectory) NetworkAddress(org.apache.ignite.network.NetworkAddress) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AfterEach(org.junit.jupiter.api.AfterEach) ConsoleReporter(com.codahale.metrics.ConsoleReporter) RaftOptions(org.apache.ignite.raft.jraft.option.RaftOptions) EnumOutter(org.apache.ignite.raft.jraft.entity.EnumOutter) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) TestUtils.sender(org.apache.ignite.raft.jraft.test.TestUtils.sender) IgniteLogger(org.apache.ignite.lang.IgniteLogger) ByteBuffer(java.nio.ByteBuffer) ReadOnlyOption(org.apache.ignite.raft.jraft.option.ReadOnlyOption) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) NodeFinder(org.apache.ignite.network.NodeFinder) Node(org.apache.ignite.raft.jraft.Node) JoinableClosure(org.apache.ignite.raft.jraft.closure.JoinableClosure) TestIgniteRpcServer(org.apache.ignite.raft.jraft.rpc.TestIgniteRpcServer) SnapshotReader(org.apache.ignite.raft.jraft.storage.snapshot.SnapshotReader) Status(org.apache.ignite.raft.jraft.Status) BootstrapOptions(org.apache.ignite.raft.jraft.option.BootstrapOptions) TestInfo(org.junit.jupiter.api.TestInfo) Utils(org.apache.ignite.raft.jraft.util.Utils) Test(org.junit.jupiter.api.Test) List(java.util.List) StaticNodeFinder(org.apache.ignite.network.StaticNodeFinder) RpcClientEx(org.apache.ignite.raft.jraft.rpc.RpcClientEx) Configuration(org.apache.ignite.raft.jraft.conf.Configuration) ReadIndexClosure(org.apache.ignite.raft.jraft.closure.ReadIndexClosure) Bits(org.apache.ignite.raft.jraft.util.Bits) ClusterServiceTestUtils(org.apache.ignite.utils.ClusterServiceTestUtils) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) FixedThreadsExecutorGroup(org.apache.ignite.raft.jraft.util.concurrent.FixedThreadsExecutorGroup) AtomicReference(java.util.concurrent.atomic.AtomicReference) NodeOptions(org.apache.ignite.raft.jraft.option.NodeOptions) HashSet(java.util.HashSet) BiPredicate(java.util.function.BiPredicate) Iterator(org.apache.ignite.raft.jraft.Iterator) ExecutorService(java.util.concurrent.ExecutorService) JRaftUtils(org.apache.ignite.raft.jraft.JRaftUtils) UTF_8(java.nio.charset.StandardCharsets.UTF_8) RpcRequests(org.apache.ignite.raft.jraft.rpc.RpcRequests) IgniteRpcClient(org.apache.ignite.raft.jraft.rpc.impl.IgniteRpcClient) TimeUnit(java.util.concurrent.TimeUnit) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Collectors.toList(java.util.stream.Collectors.toList) ThroughputSnapshotThrottle(org.apache.ignite.raft.jraft.storage.snapshot.ThroughputSnapshotThrottle) ClusterService(org.apache.ignite.network.ClusterService) WorkDirectoryExtension(org.apache.ignite.internal.testframework.WorkDirectoryExtension) UserLog(org.apache.ignite.raft.jraft.entity.UserLog) Collections(java.util.Collections) Node(org.apache.ignite.raft.jraft.Node) PeerId(org.apache.ignite.raft.jraft.entity.PeerId) Test(org.junit.jupiter.api.Test)

Aggregations

Node (org.apache.ignite.raft.jraft.Node)84 PeerId (org.apache.ignite.raft.jraft.entity.PeerId)75 Test (org.junit.jupiter.api.Test)66 Endpoint (org.apache.ignite.raft.jraft.util.Endpoint)38 CountDownLatch (java.util.concurrent.CountDownLatch)30 ArrayList (java.util.ArrayList)26 Status (org.apache.ignite.raft.jraft.Status)23 Configuration (org.apache.ignite.raft.jraft.conf.Configuration)23 Task (org.apache.ignite.raft.jraft.entity.Task)18 SynchronizedClosure (org.apache.ignite.raft.jraft.closure.SynchronizedClosure)17 NodeOptions (org.apache.ignite.raft.jraft.option.NodeOptions)16 ByteBuffer (java.nio.ByteBuffer)15 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)12 RaftGroupService (org.apache.ignite.raft.jraft.RaftGroupService)12 RaftException (org.apache.ignite.raft.jraft.error.RaftException)11 LinkedHashSet (java.util.LinkedHashSet)10 ReadIndexClosure (org.apache.ignite.raft.jraft.closure.ReadIndexClosure)10 List (java.util.List)9 LogIndexOutOfBoundsException (org.apache.ignite.raft.jraft.error.LogIndexOutOfBoundsException)9 LogNotFoundException (org.apache.ignite.raft.jraft.error.LogNotFoundException)9