private long syncSlots() throws Throwable { int retry = 0; int logRolled = 0; long totalSynced = 0; do { try { totalSynced = syncSlots(stream, slots, 0, slotIndex); break; } catch (Throwable e) { LOG.warn("unable to sync slots, retry=" + retry); if (++retry >= maxRetriesBeforeRoll) { if (logRolled >= maxSyncFailureRoll && isRunning()) { LOG.error("Sync slots after log roll failed, abort.", e); throw e; } if (!rollWriterWithRetries()) { throw e; } logRolled++; retry = 0; } } } while (isRunning()); return totalSynced; }
long slotSize = syncSlots(); logs.getLast().addToSize(slotSize); totalSyncedToStore = totalSynced.addAndGet(slotSize);
private long syncSlots() throws Throwable { int retry = 0; int logRolled = 0; long totalSynced = 0; do { try { totalSynced = syncSlots(stream, slots, 0, slotIndex); break; } catch (Throwable e) { LOG.warn("unable to sync slots, retry=" + retry); if (++retry >= maxRetriesBeforeRoll) { if (logRolled >= maxSyncFailureRoll && isRunning()) { LOG.error("Sync slots after log roll failed, abort.", e); throw e; } if (!rollWriterWithRetries()) { throw e; } logRolled++; retry = 0; } } } while (isRunning()); return totalSynced; }
private long syncSlots() throws Throwable { int retry = 0; int logRolled = 0; long totalSynced = 0; do { try { totalSynced = syncSlots(stream, slots, 0, slotIndex); break; } catch (Throwable e) { LOG.warn("unable to sync slots, retry=" + retry); if (++retry >= maxRetriesBeforeRoll) { if (logRolled >= maxSyncFailureRoll && isRunning()) { LOG.error("Sync slots after log roll failed, abort.", e); throw e; } if (!rollWriterWithRetries()) { throw e; } logRolled++; retry = 0; } } } while (isRunning()); return totalSynced; }
long slotSize = syncSlots(); logs.getLast().addToSize(slotSize); totalSyncedToStore = totalSynced.addAndGet(slotSize);
long slotSize = syncSlots(); logs.getLast().addToSize(slotSize); totalSyncedToStore = totalSynced.addAndGet(slotSize);
totalSynced.addAndGet(syncSlots()); slotIndex = 0; inSync.set(false);
private long syncSlots() throws Throwable { int retry = 0; int logRolled = 0; long totalSynced = 0; do { try { totalSynced = syncSlots(stream, slots, 0, slotIndex); break; } catch (Throwable e) { LOG.warn("unable to sync slots, retry=" + retry); if (++retry >= maxRetriesBeforeRoll) { if (logRolled >= maxSyncFailureRoll) { LOG.error("Sync slots after log roll failed, abort.", e); sendAbortProcessSignal(); throw e; } if (!rollWriterOrDie()) { throw e; } logRolled++; retry = 0; } } } while (isRunning()); return totalSynced; }