{"record":{"id":"ace0b3c833ec806e","repo":"apache/cassandra","slug":"error-in-log-follower","errorCode":null,"errorMessage":"Error in log follower","messagePattern":"Error in log follower","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/log/LocalLog.java","lineNumber":861,"sourceCode":"                        {\n                            signal.await();\n                            signal = null;\n                        }\n                    }\n                }\n                catch (StopProcessingException t)\n                {\n                    logger.warn(\"Stopping log processing on the node... All subsequent epochs will be ignored.\", t);\n                    executor.shutdown();\n                }\n                catch (InterruptedException t)\n                {\n                    // ignore\n                }\n                catch (Throwable t)\n                {\n                    // TODO handle properly\n                    logger.warn(\"Error in log follower\", t);\n                }\n                finally\n                {\n                    // If signal was not consumed for some reason, cancel it\n                    if (signal != null)\n                        signal.cancel();\n                }\n            }\n        }\n\n        private class AwaitCommit\n        {\n            private final Epoch waitingFor;\n\n            private AwaitCommit(Epoch waitingFor)\n            {\n                this.waitingFor = waitingFor;\n            }","sourceCodeStart":843,"sourceCodeEnd":879,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/log/LocalLog.java#L843-L879","documentation":"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.","triggerScenarios":"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.","commonSituations":"Corrupt or unreadable local log entries; bugs in transformation application; concurrency issues around signal cancellation; upgrades applying entries serialized by newer versions.","solutions":["Inspect the logged Throwable to identify the failing entry or transformation.","Restart the node to rebuild LocalLog state and re-attempt catch-up from the CMS.","If entries are corrupt, force a fresh snapshot/catch-up from the CMS or a healthy peer.","Watch for repeated occurrences - the error is swallowed, so the follower may silently lag behind epochs; compare epochs with the CMS."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    apply(entry);\n} catch (Throwable t) {\n    logger.warn(\"Error in log follower\", t);\n    // track lastGoodEpoch and request a fresh catch-up/snapshot\n    requestCatchupFromCms();\n}","preventionTips":["Monitor follower epoch lag against the CMS to catch silent failures.","Corrupt local log data should be rebuilt from a CMS snapshot.","Restart nodes that log repeated follower errors."],"tags":["tcm","log-follower","unhandled-exception","replication"],"backgroundTag":"internal-invariant-violation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}