Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve transaction state from sqlite3_txn_state #849

Open
dkfellows opened this issue Mar 8, 2023 · 0 comments
Open

Retrieve transaction state from sqlite3_txn_state #849

dkfellows opened this issue Mar 8, 2023 · 0 comments
Labels
enhancement:SQLite Enhancement about sqlite features impacts:JNI Has impact on JNI C code

Comments

@dkfellows
Copy link

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.

@gotson gotson added enhancement:SQLite Enhancement about sqlite features impacts:JNI Has impact on JNI C code and removed triage labels Mar 9, 2023
@gotson gotson changed the title Get Transaction State Retrieve transaction state from sqlite3_txn_state Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:SQLite Enhancement about sqlite features impacts:JNI Has impact on JNI C code
Projects
None yet
Development

No branches or pull requests

2 participants