-
-
Notifications
You must be signed in to change notification settings - Fork 105
fix: guard op-state timeout notifications #2043
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
Conversation
85bd9dd to
836b8fe
Compare
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if removed { | ||
| tracing::debug!("Transaction timed out: {tx}"); | ||
| event_loop_notifier.notifications_sender.send(Either::Right(NodeEvent::TransactionTimedOut(tx))).await.unwrap(); | ||
| notify_transaction_timeout(&event_loop_notifier, tx).await; |
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.
@claude change this to warn indtead
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.
Claude finished @iduartgomez's task —— View job
Change Complete
- Read the file to identify line 429
- Change log level to warn
- Commit and push changes
Changed the log level from debug to warn in the notify_transaction_timeout function at line 345. This warning now properly alerts when the event loop receiver has been dropped during shutdown.
Changes:
crates/core/src/node/op_state_manager.rs:345- Changedtracing::debug!totracing::warn!
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.
@claude check if is an error while sending and log a warn
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.
Claude finished @iduartgomez's task —— View job
Analysis Complete
- Read the current code to understand the send operation
- Analyze error handling implementation
Current Implementation:
The notify_transaction_timeout function (crates/core/src/node/op_state_manager.rs:334-353) already implements error checking and warning logging:
match event_loop_notifier
.notifications_sender
.send(Either::Right(NodeEvent::TransactionTimedOut(tx)))
.await
{
Ok(()) => true,
Err(err) => {
tracing::warn!(
tx = %tx,
error = ?err,
"Failed to notify event loop about timed out transaction; receiver likely dropped"
);
false
}
}The function returns a bool (true on success, false on error) and logs a warning when the send fails.
Call Sites:
The function is called at two locations (lines 400 and 429) without using the return value:
- Line 400:
notify_transaction_timeout(&event_loop_notifier, tx).await; - Line 429:
notify_transaction_timeout(&event_loop_notifier, tx).await;
Question:
The error checking and warning are already implemented inside the function. Would you like me to:
- Keep it as-is (the function already logs warnings on send errors)
- Make the call sites explicitly check the return value and add additional logging
- Something else?
Please clarify what specific change you'd like made.
Co-authored-by: nacho.d.g <iduartgomez@users.noreply.github.com>
Summary
Testing
Fixes #2042