Skip to content

avoid locks on "read by other session" #2

Description

@valrusu

the rowid list is very likely containing rows from the same blocks one after another. when many sessions delete those close rows, the database will see a lot of "read by other session" waits.
I cannot avoid this at extract time because it would mean it would mean a heavy sort on the source database, maybe by a random value.

option 1: read all rowids at once, and start processing them in a random order or push to the delete goroutines rows which are not close to the others, from different areas on the input list

option 2: read N rows at a time (parameter) and apply the above logic to tuia buffer, then read again N etc.

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