Пример #1
0
        private async Task Recover()
        {
            var docIdInDataFile = await _dataFile.GetLastDocId();

            var docsFromWal = await _wal.ReadDocsAfter(docIdInDataFile);

            await _dataFile.Apply(Tran.WithDocuments(docsFromWal));
        }
Пример #2
0
        public async Task AddDocuments(IReadOnlyCollection <Document> docs)
        {
            var tran = Tran.WithDocuments(docs);

            await CommitTran(tran).ConfigureAwait(false);
        }