use of org.neo4j.causalclustering.catchup.CatchUpClientException in project neo4j by neo4j.
the class RemoteStore method pullTransactions.
private CatchupResult pullTransactions(MemberId from, StoreId expectedStoreId, File storeDir, long fromTxId, boolean asPartOfStoreCopy) throws IOException, StoreCopyFailedException {
try (TransactionLogCatchUpWriter writer = transactionLogFactory.create(storeDir, fs, pageCache, logProvider, fromTxId, asPartOfStoreCopy)) {
log.info("Pulling transactions from: %d", fromTxId);
long previousTxId = fromTxId - 1;
CatchupResult lastStatus;
do {
TxPullRequestResult result = txPullClient.pullTransactions(from, expectedStoreId, previousTxId, writer);
lastStatus = result.catchupResult();
previousTxId = result.lastTxId();
} while (lastStatus == SUCCESS_END_OF_BATCH);
return lastStatus;
} catch (CatchUpClientException e) {
throw new StoreCopyFailedException(e);
}
}
Aggregations