Skip to content

Cap the database appender buffer instead of discarding a failed batch #4369

Open

Description

@ramanathan1504

AbstractDatabaseManager.flush() discards the buffered events when connecting, writing or committing fails (#4318, #4319). That bounds memory, but events the database never saw are lost: with autoCommit=false a failed commit rolls back, and a failed connect never sends anything.

An alternative is to keep the batch and cap the buffer at bufferSize, so a short outage ends with the events written once the connection returns. That needs a policy decision: which event is dropped when the buffer is full, the oldest or the newest, and whether that is configurable.

Raised on #4319, where the contributor proposed capping. Kept separate so the leak fix stays backportable.

Activity

  1. added
    appenders
    appenders:JDBC
    enhancement
    on Nov 6, 2026
  2. ramanathan1504 commented on Nov 7, 2026

    @ramanathan1504
    ContributorAuthor

    Grouping related reports here so they are tracked in one place (JDBC appender behaviour on a failed batch):

  3. added
    priority: P3
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appendersappenders:JDBCenhancementpriority: P3

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions