Fix graph execution bug with multiple joins downstream of same fork #3337
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3296
I realized that there were two issues in the existing implementation due to not thinking deeply enough about what happens when you have multiple joins feeding into each other downstream of a single fork:
I think the first (fork stack) bullet above was a bug, and may still have some bugs, but I think it wasn't what was actively causing problems — the second bullet was what was causing the problem. But I think if we don't fix the fork stack tracking it will be the source of other bugs in the future. If related bugs do arise in the future, whoever works on it (probably me, but still) should probably study the changes in this PR and think more deeply about what the "correct" behavior is (assuming the behavior in this PR is not actually correct.. which I'm not totally sure of at this time sadly, other than that again, all existing tests pass).