private void replayLogs(Collection<TransactionLog> logs) {
for (TransactionLog log : logs) {
LOG.info("Replaying edits from transaction log " + log.getName());
int editCnt = 0;
try {
TransactionLogReader reader = log.getReader();
// reader may be null in the case of an empty file
if (reader == null) {
continue;
}
TransactionEdit edit = null;
while ((edit = reader.next()) != null) {
editCnt++;
switch (edit.getState()) {
case INPROGRESS:
addInProgressAndAdvance(edit.getWritePointer(), edit.getVisibilityUpperBound(),
edit.getExpiration(), edit.getNextWritePointer());