Skip to content

Async queries start failing with "C++ exception" #5

@wyozi

Description

@wyozi

Quite hard to pinpoint the exact cause but this starts randomly happening at some point

local q = db:query("SELECT 1")
print("r", pcall(function()q:run() end ))

prints r false C++ exception

I think this is a data race issue. The whole DatabaseQuery::last_query thing seems quite susceptible to dataraces. I believe adding a ConcurrentQueue for incoming async queries would improve that. I can see if I can create a patch for it at some point later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedThe issue is confirmed to be the case.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions