-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(core): Fix panic when reloading config under load #14875
Conversation
✅ Deploy Preview for vector-project ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@Zettroke I appreciate you taking the time to try and come up with a fix for the linked issue.
Can you elaborate more on what the broken logic is? The main reason that we handle control messages during an in-flight send in I see your change gets rid of the handling of control messages during an in-flight send, and simply blocks waiting for the send to fully complete... which would certainly avoid issues of handling changes to
This is partially addressed but what I've mentioned above, but the reason for the symmetry -- having |
04988cc
to
81d0984
Compare
@tobz Seems I rushed with fix without completely understanding reload logic. Thanks for explanation.
|
I'll preface this with saying that I realize I touched this code most recently, and so I'm still refreshing myself on all the reasons I wrote it the way that I did, so apologies for asking questions that theoretically I should know the answer to. 😂 I'm still unclear on why this bug is occurring. The assert in This change is still papering over that fact by simply not asserting that we actually got back the sender value when we |
Topology doesn't send pause twice. Also fun fact: problem occurs in release mode, but not in debug mode There is debug logs which may help with my lousy explanations) |
Considering assert against double pause, and other invalid control sequences. I can add |
Ah, right! Sorry, I think I'm finally caught up. Right, so we take the Thinking it through, I believe your new approach is the correct one. The main constraint we need to uphold is that the sender slot -- I'd still like to keep the assertion that we aren't double pausing, though. One way we could do that is to have I'm thinking we may also want to do the same type of assert for |
✅ Deploy Preview for vrl-playground ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me, and thinking it through, it also seems good to me. Going to get another review on it, though, as now I myself have added/changed code.
Fixes #13814
Fix panic when reloading config under load.
Panic was caused by incorrect
pause
implementation inSendGroup
, which tries to remove senders without handling case when send is in-flightIt appears to me that handling control signals during events sending is useless. Because in
Fanout::send
before each send we consume and process all control signals.Also
add
,replace
andpause
handlers inSendGroup
is equivalent to handlers inFanout
(they didn't affect in-flight sends). Onlyremove
is handled differently, and I am not sure if this special handling is required.Also removing control signals handling during send simplifies code a bit.