private void ApplyPagesToDataFileFromJournal(List <Page> sortedPagesToWrite) { var last = sortedPagesToWrite.Last(); var numberOfPagesInLastPage = last.IsOverflow == false ? 1 : _env.Options.DataPager.GetNumberOfOverflowPages(last.OverflowSize); _dataPager.EnsureContinuous(null, last.PageNumber, numberOfPagesInLastPage); foreach (var page in sortedPagesToWrite) { _dataPager.Write(page); } _dataPager.Sync(); }