private void ProcessCommitReplicated(StorageMessage.CommitAck message) { PendingTransaction transaction; long lastEventNumber = message.LastEventNumber; if (_pendingTransactions.TryRemove(message.TransactionPosition, out transaction)) { var isTfEof = IsTfEof(transaction.PostPosition); if (transaction.Prepares.Count > 0) { _indexCommitter.Commit(transaction.Prepares, isTfEof, true); } if (transaction.Commit != null) { lastEventNumber = _indexCommitter.Commit(transaction.Commit, isTfEof, true); } } lastEventNumber = lastEventNumber == EventNumber.Invalid ? message.LastEventNumber : lastEventNumber; _publisher.Publish(new ReplicationTrackingMessage.IndexedTo(message.LogPosition)); _publisher.Publish(new StorageMessage.CommitIndexed(message.CorrelationId, message.LogPosition, message.TransactionPosition, message.FirstEventNumber, lastEventNumber)); }
public void CommitToIndex(IList <IPrepareLogRecord <TStreamId> > prepares) { _indexCommitter.Commit(prepares, false, false); }
public void CommitToIndex(IList <PrepareLogRecord> prepares) { _indexCommitter.Commit(prepares, false, false); }