Retrieve transaction state from `sqlite3_txn_state`

Aperta
#849 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sqlite
Ambito
database

Direzione di ricerca

Start by reading the native binding code around NativeDB and how it exposes SQLite C API functions to Java; the issue does not name specific files or tests. Check how sqlite3_txn_state() can be exposed with the requested database argument, then identify or add coverage for the returned transaction state. Done means Java callers can retrieve that state for debugging.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement:SQLite impacts:JNI

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.

Lingua principale
Java
Stelle
3.3k
Fork
676
Merge medio
1g 15h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xerial/sqlite-jdbc

Tutte le issue di xerial/sqlite-jdbc

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.