-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Atlas Streams
-
Fully Compatible
-
ALL
-
Sprint 46
A stop request during an ongoing start flow can cause an invariant:
"msg":"Invariant failure","svc":"-","attr":{"line":983,"expr":"!status.isOK()","file":"src/mongo/util/future.h"
} catch (const SPException& e) { // This catch block gets hit with an SPException that has an OK status. // This leads to the invariant when we call setError LOGV2_WARNING(75900, "encountered stream processor exception, exiting runLoop(): {error}", "context"_attr = _context, "errorCode"_attr = e.code(), "reason"_attr = e.reason(), "unsafeErrorMessage"_attr = e.unsafeReason(), "error"_attr = e.what()); _promise.setError(e.toStatus()); promiseFulfilled = true; } catch (const DBException& e) {
Example 1 (staging):
4:34:59.650 AM — Agent starting stream processor
4:34:59.651 AM — About to start stream processor
// SPM sends an errant stop request due to bug in heartbeat rejection logic.
4:35:01.523 AM — Stopping stream processor
4:35:01.568 AM — started operator dag
4:35:01.568 AM — encountered stream processor exception, exiting runLoop(): {error}
4:35:01.568 AM — Invariant failure
Example 2 (prod):
8:10:17.832 AM – Starting stream processor
// This is the k8s shutdown flow. A side question is, why is it happening now?
8:10:18.745 AM – Stopping all streamProcessors
8:10:18.745 AM – Stopping stream processor
8:10:18.833 AM – encountered stream processor exception, exiting runLoop(): {error}
8:10:18.833 AM – expr: !status.isOK(), file: src/mongo/util/future.h, line: 983
Example 3 (prod):