Skip to content

Ban Dirty Save performance is very bad #5

@Lazersmoke

Description

@Lazersmoke

When using /bansave or shutting down the server, BanStick hangs on Ban Dirty Save for a very long time.

It appears to not batch properly, as in it saves each dirty ban one at a time in its own SQL query, since SQL show processlist always reports one or two queries running for 0ms. This is probably because dirtyBans is being populated by one of the scrapers at the same time as it is being consumed by the saveDirty method, creating a race condition between adding the next ban from the scraper and saving the next ban. If the saving wins,, it finishes the loop and exits. If the scraper wins, it continues the loop, which is the observed behavior.

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