-
Notifications
You must be signed in to change notification settings - Fork 110
Fix dropped errors in manifold.go-off
#249
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
base: fix-dropped-errors-in-timeout
Are you sure you want to change the base?
Fix dropped errors in manifold.go-off
#249
Conversation
Timeout tests are changed so that every timeout exception has a uniquely identifiable message which makes it easier to match up the dropped error warning with the originating timeout.
(catch Throwable ex | ||
(d/error! (async-runtime/aget-object state async-runtime/USER-START-IDX) ex) | ||
(throw ex)))) | ||
(d/error! (async-runtime/aget-object state async-runtime/USER-START-IDX) ex)))) |
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.
I haven't used this code in years, can't say I remember why we were re-throwing the original error
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.
Thanks for your reply! Alright, I'll try to get to the bottom of this myself then 💪
(is (= ::timeout @(go-off (<!? (d/alt (d/deferred) (d/timeout! (d/deferred) 10 ::timeout)))))) | ||
(is (= ::timeout @(d/alt (go-off (<!? (d/deferred))) (d/timeout! (d/deferred) 10 ::timeout)))) | ||
(is (= ::timeout @(go-off (<!? (d/alt (d/deferred) (d/timeout! (d/deferred) 13 ::timeout)))))) | ||
(is (= ::timeout @(d/alt (go-off (<!? (d/deferred))) (d/timeout! (d/deferred) 14 ::timeout)))) |
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.
why is this change necessary?
(try (async-runtime/run-state-machine state) | ||
(catch Throwable ex | ||
(d/error! (async-runtime/aget-object state async-runtime/USER-START-IDX) ex) | ||
(throw ex)))) |
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.
was this rethrow the core of the issue?
since you're catching the extremely wide Throwable it'd feel safer to keep the rethrow unless that's what's causing the problem
Timeout tests are changed so that every timeout exception has a uniquely identifiable message which makes it easier to match up the dropped error warning with the originating timeout.
Based on #248. Fixes the remaining dropped error failure in
manifold.go-off-test
.@tanzoniteblack Sine you're the original author of
manifold.go-off
, maybe you could review this one? 🙏 I'm not quite sure whether not re-throwing the exception here breaks anything else, and if it should, maybe you could provide a test case? It definitely does lead to an unhandled deferred in error state, though, as evidenced by the test failure without the patch. However, I don't even grok which deferred that is 😅