Skip to content

Conversation

shiyasmohd
Copy link
Contributor

When reassigning subgraph and not pausing, it gives the below error and creates a race condition.

Failed to transact block operations: subgraph `Qm.....` has already processed block `xxx`; there are most likely two (or more) nodes indexing this subgraph

This PR solves the issue by pausing subgraphs and waits before reassigning subgraphs.

@shiyasmohd shiyasmohd self-assigned this Sep 12, 2025
Comment on lines +26 to +29
println!(
"Waiting {}s to make sure pausing was processed ...",
delay.as_secs()
);
Copy link
Member

Choose a reason for hiding this comment

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

The delay is not actually used, i think what you meant to do is to call sleep() here too with the delay

Comment on lines +44 to 48
primary_pool.clone(),
notification_sender.clone(),
&deployment,
node,
curr_node,
Copy link
Member

Choose a reason for hiding this comment

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

minor nitpick: if the pause::run succeeds and actual reassign fails the resume will never run and the subgraph would be paused unintentionally.

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.

2 participants