Ensure that SQLite connections are used correctly to preserve isolation #84
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per discussion with @rnewman, the current transactor -- even post #80 -- doesn't handle concurrent reads correctly in JavaScript.
In JavaScript: since there's only a single thread, all reads will race to read and write, potentially witnessing in-progress transactions. What we really want is (at least) one read DB connection(s) and exactly one write DB connection. The write connection serves to isolate the read connection(s) from in-progress transactions, while the read(s) connection service queries.
In Java: we're a bit concerned that JDBC and the SQLite JDBC driver may be multiplexing DB connections among threads in hard to predict ways. Again, we'd like to address this as above (with read DB connections and a distinguished write DB connection), but in addition we'd like to pin te write DB connection to a distinguished thread, to avoid any DB connection multiplexing.