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

patch for interrupt in subgrahph #2936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vigneshmj1997
Copy link

Issue Description

While working with interrupts in subgraphs, I noticed that the interrupt mechanism fails to function correctly when invoked for the second time. Specifically, the interrupt does not halt execution as expected during subsequent invocations, leading to unintended continuation of node execution.


Solution

To address this issue, I modified the logic to ensure that the writes variable is only updated if __interrupt__ is explicitly present in conf[__pregel_writes]. If __interrupt__ is not found, writes remains an empty list. This change ensures that the graph halts execution as expected when an interrupt is encountered and prevents the writes variable from being populated with invalid or unintended values.


Changes Made

  1. Updated the logic in writes (see code link) to check for the presence of __interrupt__ in __pregel_writes.
  2. If __interrupt__ is found, writes is updated with the corresponding value.
  3. If __interrupt__ is not found, writes remains an empty list.

Impact

This change ensures that:

  • The graph halts execution as expected when an interrupt is encountered, improving the correctness of the subgraph behavior.

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