예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void readReplicaShouldStartAfterPartialTransactionWriteCrash() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ReadReplicaShouldStartAfterPartialTransactionWriteCrash()
        {
            // given: a fully synced cluster with some data
            dataMatchesEventually(createEmptyNodes(_cluster, 10), _cluster.readReplicas());

            // when: shutting down a read replica
            ReadReplica readReplica = _cluster.getReadReplicaById(0);

            readReplica.Shutdown();

            // and making sure there will be something new to pull
            CoreClusterMember lastWrites = createEmptyNodes(_cluster, 10);

            dataMatchesEventually(lastWrites, _cluster.coreMembers());

            // and writing a partial tx
            WritePartialTx(readReplica.DatabaseDirectory());

            // then: we should still be able to start
            readReplica.Start();

            // and become fully synced again
            dataMatchesEventually(lastWrites, singletonList(readReplica));
        }
예제 #2
0
 private void RemoveReadReplica(ReadReplica memberToRemove)
 {
     memberToRemove.Shutdown();
     _readReplicas.Values.remove(memberToRemove);
 }