Skip to content

Bidirectional Sync (Part 2)#671

Draft
volovyks wants to merge 17 commits intodevelopfrom
serhii/sync-to-active-fix
Draft

Bidirectional Sync (Part 2)#671
volovyks wants to merge 17 commits intodevelopfrom
serhii/sync-to-active-fix

Conversation

@volovyks
Copy link
Contributor

No description provided.

use crate::node_client::Options as NodeClientOptions;

#[tokio::test]
async fn test_broadcast_sync_on_empty_update() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic was unclear to me. When the owner sends an empty update, it means they no longer hold any Ts or Ps, and other nodes need to clean up their storage accordingly. This situation can occur if someone drops their storage or uses all of their owned Ts or Ps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ChaoticTempest is that an attempt to handle storage errors? fetch_owned returns a Vec no matter what:

pub async fn fetch_owned(&self, me: Participant) -> Vec<A::Id>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now fetch_owned returns a Result<>

.insert(dummy_pair(id), node)
.await;
#[test_log::test(tokio::test)]
async fn test_state_sync_e2e() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I'm using a simple Integration test for State sync. I may work on the component layer implementation later.

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.

1 participant