Skip to content

Timebox each delete query to prevent cases where db instance getting throttled #2

@aezomz

Description

@aezomz

Time box each delete query, especially the long tail deletion.

  1. for each delete with limit 1000 -> relatively fast due to early return
  2. until the remaining <1000 -> this is slow and normally does a deeper scan based on the query plan and scanning, chances of this being stucked is much higher

Track the deletion duration and it shouldnt exceed 1 minute -default (configurable)
If exceeded, safely abort / kill the query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions