-
Notifications
You must be signed in to change notification settings - Fork 267
Transactional api integration #2076
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just putting a reject on here to make sure it doesn't get merged before the git references in Cargo.toml
s get set to real published versions - feel free to clear this when ready.
crates/core/src/agent/chain_store.rs
Outdated
use holochain_persistence_api::{ | ||
error::PersistenceResult, | ||
txn::{CursorDyn, CursorProviderDyn}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer use
s at top of file or within a scope
self.holding_map == other.holding_map | ||
&& (*content.read().unwrap()).get_id() == (*other_content.read().unwrap()).get_id() | ||
&& *meta.read().unwrap() == *other_meta.read().unwrap() | ||
&& (*self.persistence_manager).get_id() == (*other.persistence_manager).get_id() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw another Eq operation like this with the derefs / get_id() thing - should this be a PartialEq/Eq on the persistence_manager itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that this could be a partialEQ on the Persistence Manager itself
crates/core/src/dht/dht_store.rs
Outdated
@@ -117,28 +106,31 @@ pub fn create_get_links_eavi_query<'a>( | |||
)) | |||
} | |||
|
|||
use holochain_persistence_api::txn::{CursorDyn, CursorProviderDyn}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto use
placement
do | ||
cd $d | ||
if grep "$CRATE" Cargo.toml > /dev/null; then | ||
cargo-add add $CRATE --git $REPO --branch $BRANCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
lol... deptool2.. : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the code is easier to read/comprehend - nice work 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏
(+1 on cleaning up the dependencies after merging the remote branch)
PR summary
This PR integrates the latest api changes/improvements from this holochain- persistence PR. The PR needs to be merged and release on crates.io BEFORE this PR is merged. Summary of changes:
PersistenceManager
trait which wraps a single CAS, EAV, and transactional cursor api.CursorRw
to mutate the CAS and EAV in a transactional capacity in the persister and reducers.Attribute
implementation as it's provided by persistence api now.testing/benchmarking notes
( if any manual testing or benchmarking was/should be done, add notes and/or screenshots here )
followups
( any new tickets/concerns that were discovered or created during this work but aren't in scope for review here )
changelog
documentation