Skip to content

Commit

Permalink
don't process emptyset
Browse files Browse the repository at this point in the history
  • Loading branch information
somtochiama committed Jul 5, 2024
1 parent 47ae385 commit e6d4f62
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions crates/corro-agent/src/agent/run_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ async fn run(agent: Agent, opts: AgentOptions, pconf: PerfConfig) -> eyre::Resul
tripwire.clone(),
));

spawn_counted(handlers::handle_emptyset(
agent.clone(),
bookie.clone(),
rx_emptyset,
tripwire.clone(),
));
// spawn_counted(handlers::handle_emptyset(
// agent.clone(),
// bookie.clone(),
// rx_emptyset,
// tripwire.clone(),
// ));

Ok(bookie)
}
16 changes: 8 additions & 8 deletions crates/corro-agent/src/api/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ pub async fn parallel_sync(

let counts = FuturesUnordered::from_iter(readers.into_iter().map(|(actor_id, mut read)| {
let tx_changes = agent.tx_changes().clone();
let tx_emptyset = agent.tx_emptyset().clone();
// let tx_emptyset = agent.tx_emptyset().clone();

async move {
let mut count = 0;
Expand Down Expand Up @@ -1402,13 +1402,13 @@ pub async fn parallel_sync(
change.seqs()
);
// only accept emptyset that's from the same node that's syncing
if change.is_empty_set() {
tx_emptyset
.send(change)
.await
.map_err(|_| SyncRecvError::ChangesChannelClosed)?;
continue;
}
// if change.is_empty_set() {
// tx_emptyset
// .send(change)
// .await
// .map_err(|_| SyncRecvError::ChangesChannelClosed)?;
// continue;
// }

tx_changes
.send((change, ChangeSource::Sync))
Expand Down

0 comments on commit e6d4f62

Please sign in to comment.