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

Cursor and transactional support for CAS and EAV #18

Open
wants to merge 150 commits into
base: develop
Choose a base branch
from

Conversation

struktured
Copy link
Contributor

@struktured struktured commented Jan 10, 2020

PR summary

  • Introduce CursorProvider, Cursor, and PersistenceManager traits
  • make holochain-persistence-lmdb have full support for cursors
    • internal write cursors are lazy
    • ephemeral databases are internally maintained to stage diffs to the cas/eav
    • ability to commit or abort the stage diffs on the primary database
  • Adds dynamic versions of the above so the Cursor, Eav, Ca associated types aren't required by users of the api

TODO

  • Ensure store still doubles it size when necessary (ensure existing unit tests for it are sound)
  • Implement persistence manager for other non lmdb persistence impls (should be trivial if we make them non transactional).
  • Fix commented out transactional tomb stone test (doesn't compile)
  • make creation of temporary database lazy
  • remove 'static requirements in CursorDyn related apis.

Review checklist

  • The story has unit or integration tests
  • No new bugs, and any tech-debt is identified and justified
  • There is enough API documentation (how to use)
  • There is enough code documentation (how the code works)

@struktured struktured self-assigned this Jan 10, 2020
@StaticallyTypedAnxiety
Copy link
Contributor

Just popped in for a question, I was wondering how it handles tombstones.

@struktured
Copy link
Contributor Author

struktured commented Jan 14, 2020 via email

@StaticallyTypedAnxiety
Copy link
Contributor

Ashanti- the abstraction sits outside of this api in the Attribute enum. The idea in practice is the user of a cursor would do any CRUD related stuff in a transaction over the CAS and EAV together as they saw fit.

On Tue, Jan 14, 2020 at 1:45 AM Purple Hair Rust Bard < @.***> wrote: Just popped in for a question, I was wondering how it handles tombstones. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <#18?email_source=notifications&email_token=ABGTLIVRPHAA45XSHFD4W63Q5VNQJA5CNFSM4KFL3FVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI3PXWA#issuecomment-574028760>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGTLIXA3NGBTKANKODDYKDQ5VNQJANCNFSM4KFL3FVA .

Awesome! Looks good!

Copy link

@timotree3 timotree3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are incomplete comments but I'm posting them for the sake of our conversation

crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/lib.rs Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
crates/holochain_persistence_api/src/txn/mod.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants