Skip to content

Creating records in after_failure callbacks with SQLite #318

Open

Description

@awhitty

I've read over #122 and the commit referenced in the issue. Using a separate database connection on a model to create records that are not affected by the transaction rollback is definitely a nice workaround. However, SQLite does not support concurrent connections, so the second database connection hangs while the transaction is still pending and the transaction never gets committed because it's waiting for the after_failure callback to return, yielding this exception: SQLite3::BusyException: database is locked: commit transaction.

It would be nice to break the after_failure callback out of the transaction or to at least have that as an option.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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