fix(reliability): bound CassandraUtil read retries to stop StackOverflow crash (CJ-1) - #909
fix(reliability): bound CassandraUtil read retries to stop StackOverflow crash (CJ-1)#909pallakartheekreddy wants to merge 1 commit into
Conversation
…low crash (CJ-1) jobs-core CassandraUtil.findOne/find caught DriverException, called reconnect(), then recursed into themselves with no attempt cap. A persistently failing read (bad CQL, node down, query timeout) recursed until StackOverflowError, crashing the Flink task for all tenants -- the "one poison event kills the pipeline" failure mode. Replace the unbounded self-recursion with a bounded reconnect-and-retry helper (max 3 attempts) that rethrows the DriverException after exhaustion, so the caller can dead-letter / let Flink restart instead of stack-overflowing. Verified: jobs-core test-compiles under JDK 11 (azure profile). Implements CJ-1 (P0) from implementation-designs/knowledge-platform-jobs.md. NOTE: jobs-core is duplicated in data-pipeline/jobs-core (same bug, finding D14.1); the identical fix should be mirrored there in a separate PR.
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes CJ-1 (P0, foundational) in
implementation-designs/knowledge-platform-jobs.md.The bug
jobs-coreCassandraUtil.findOne/findcaughtDriverException, calledreconnect(), then recursed into themselves with no attempt cap:A persistently failing read (bad CQL, node down, query timeout) recurses until
StackOverflowError, crashing the Flink task for all tenants — the "one poison event kills the pipeline" failure mode this repo is prone to.The fix
Replaced the unbounded self-recursion with a bounded reconnect-and-retry helper (
maxQueryRetries = 3) that rethrows theDriverExceptionafter exhaustion, so the caller can dead-letter / let Flink restart instead of stack-overflowing. Reconnect-on-error behaviour is preserved.Verification
jobs-coretest-compiles under JDK 11 (-Pazure, exit 0;CassandraUtilrecompiled).jobs-coreis a duplicated fork shared withdata-pipeline/jobs-core, which has the same bug (finding D14.1). The identical fix should be applied there in a separate PR.Note: two pre-existing tracked deletions under
kubernets/pipelines/build/are unrelated and excluded from this branch.