Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Add transaction support #8

Open
Shelnutt2 opened this issue Apr 27, 2018 · 1 comment
Open

Add transaction support #8

Shelnutt2 opened this issue Apr 27, 2018 · 1 comment

Comments

@Shelnutt2
Copy link
Owner

Add transaction support. Items should be built and stored until commit, then added to the map. We also should only flush the map on commit.

@Shelnutt2
Copy link
Owner Author

Since a key can not be removed from the key-value map, transactions are going to end up ugly.

The basic idea so far is:

  1. Use a transaction_dir
  2. Create a temp map inside dir with uuid+timestamp
  3. Add rows to temp map
  4. On commit, we will then loop through temp map and add to new map
  5. Finally we call flush() to push to disk of final map

The problems are for group commits, we if need to rollback after one table has already committed we must now go back and set the delete markers. This means rollbacks will touch every single row, and they are not atomic either.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant