public synchronized void recoverState() { try { TransactionSnapshot lastSnapshot = persistor.getLatestSnapshot(); // if we failed before a snapshot could complete, we might not have one to restore if (lastSnapshot != null) { restoreSnapshot(lastSnapshot); } // replay any WALs since the last snapshot Collection<TransactionLog> logs = persistor.getLogsSince(lastSnapshotTime); if (logs != null) { replayLogs(logs); } } catch (IOException e) { LOG.error("Unable to read back transaction state:", e); throw Throwables.propagate(e); } }
public synchronized void recoverState() { try { TransactionSnapshot lastSnapshot = persistor.getLatestSnapshot(); // if we failed before a snapshot could complete, we might not have one to restore if (lastSnapshot != null) { restoreSnapshot(lastSnapshot); } // replay any WALs since the last snapshot Collection<TransactionLog> logs = persistor.getLogsSince(lastSnapshotTime); if (logs != null) { replayLogs(logs); } } catch (IOException e) { LOG.error("Unable to read back transaction state:", e); throw Throwables.propagate(e); } }
Collection<TransactionLog> logsToRead = storage.getLogsSince(now);