Skip to content

[DSIP-][alert] Missing task failure alerts on t_ds_alert due to non-monotonic AUTO_INCREMENT primary key in TiDB; propose 10-minute backtracking check #18462

Description

@Liguangmin

Search before asking

  • I had searched in the DSIP and found no similar DSIP.

Motivation

When running on TiDB, the primary key of t_ds_alert using default AUTO_INCREMENT is not globally monotonically increasing.
Our incremental consumer loads alerts by filtering id > last_max_id. Some later inserted alert rows get smaller IDs and will never be consumed, which leads to lost task failure alerts.

Design Detail

To mitigate this risk, we propose adding a fallback check: scan records created in the last 10 minutes with alert_status = 0 as supplementary data retrieval.

Compatibility, Deprecation, and Migration Plan

No response

Test Plan

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions