apache/cassandra · error

Error in log follower

Error message

Error in log follower

What it means

The LocalLog.Async follower loop catches any Throwable not otherwise handled while processing log signals and logs it as 'Error in log follower' (with a TODO noting it is not handled properly). The loop continues, and any unconsumed signal is cancelled in the finally block, so one bad entry does not necessarily kill the follower, but the error itself is not retried or escalated.

Solutions

  1. Inspect the logged Throwable to identify the failing entry or transformation.
  2. Restart the node to rebuild LocalLog state and re-attempt catch-up from the CMS.
  3. If entries are corrupt, force a fresh snapshot/catch-up from the CMS or a healthy peer.
  4. Watch for repeated occurrences - the error is swallowed, so the follower may silently lag behind epochs; compare epochs with the CMS.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    apply(entry);
} catch (Throwable t) {
    logger.warn("Error in log follower", t);
    // track lastGoodEpoch and request a fresh catch-up/snapshot
    requestCatchupFromCms();
}

Prevention

When it happens

Trigger: Any runtime exception thrown inside the follower loop while fetching/applying log entries or handling a signal (serialization errors on entries, NPEs in transformations, I/O errors reading the log) that is not StopProcessingException or InterruptedException.

Common situations: Corrupt or unreadable local log entries; bugs in transformation application; concurrency issues around signal cancellation; upgrades applying entries serialized by newer versions.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/ace0b3c833ec806e. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/tcm/log/LocalLog.java:861

                        {
                            signal.await();
                            signal = null;
                        }
                    }
                }
                catch (StopProcessingException t)
                {
                    logger.warn("Stopping log processing on the node... All subsequent epochs will be ignored.", t);
                    executor.shutdown();
                }
                catch (InterruptedException t)
                {
                    // ignore
                }
                catch (Throwable t)
                {
                    // TODO handle properly
                    logger.warn("Error in log follower", t);
                }
                finally
                {
                    // If signal was not consumed for some reason, cancel it
                    if (signal != null)
                        signal.cancel();
                }
            }
        }

        private class AwaitCommit
        {
            private final Epoch waitingFor;

            private AwaitCommit(Epoch waitingFor)
            {
                this.waitingFor = waitingFor;
            }

View on GitHub (pinned to 88fd0f6a0e)