Skip to content

Retrieve transaction state from sqlite3_txn_state #849

Open
@dkfellows

Description

@dkfellows

Is your feature request related to a problem? Please describe.
Sometimes, it is necessary to debug transactions when things are getting stuck (a classic is where two threads are both attempting to upgrade a read lock to a write lock at the same time; that's horrible to hunt down and causes weird failures but only really in production use). Improving the tools for debugging such things would be a Good Thing™.

Note that the bug in question is not in SQLite or the Xerial driver, but in how it is being called. I'm asking for a tool to help find my own bugs.

Describe the solution you'd like
Access to the sqlite3_txn_state() function somehow would be nice (maybe as a transactionState(String) method of NativeDB?).

I'll not write a PR for this as I don't have experience with the binding of C API functions into Java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions