Skip to content

Cassandra connector FileOffsetWriter unbounded task queue causes heap exhaustion #1791

@nirnx

Description

@nirnx

FileOffsetWriter.markOffset() submits a lambda to a single-threaded executor with an unbounded LinkedBlockingQueue for every record produced to Kafka. With the default offset.flush.interval.ms=0 (AlwaysFlushPolicy), each task performs disk I/O. At high throughput the executor cannot keep up, causing millions of FutureTask objects to accumulate in the queue and eventually exhausting the heap.

Symptoms: after ~2 hours of operation, Kafka producer latency degrades from 2ms to 800ms, throughput drops, CDC logs pile up, and restart is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions