-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support ACID transactions #21
Comments
Potential logic flow.
|
For the medeadown-usecase I'm only interested in either reading data in a snapshot or putting them in one batch. Having support for transactions would be one way to get that, but it would also mean that I'd create a snapshot everytime I'm creating a batch - even though I won't do any reads and the snapshot would be discarded directly after the batch is done. If we were to first implement #20 and #22, together maybe they could be the base for support for full transactions? |
Yes. Depending on the number of entries in the keydir, this could be very little overhead. I can start mocking up the transaction API. Perhaps there can be an options object that specifies what operations are allowed on the transaction. If reads aren't allowed, we don't have to snapshot.
Yes, indeed! |
Snapshots and write batches are now in. However, I think transaction concurrency is still a barrier to ACID compliance. Might back burner this for a bit. |
Specifically, we will need write-write conflict detection. Having timestamps on keydir entries helps, but not for concurrent, overlapping writes. When committing a transaction, we can match snapshot timestamps to keydir counterparts when running We would need to track a keydir entry as dirty, indicating a write attempt is in process. Subsequent transactions with a write operation for that key can return a write conflict. Possible tracking data structures: [
{
transaction: T1,
keys: [k1, k2, k3, k4]
}
] |
We'll save this for post-v1.0.0 (#44). |
Depends on #18, snapshot support.
The text was updated successfully, but these errors were encountered: