-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
pool: fix spurious send_event timeout error #375
pool: fix spurious send_event timeout error #375
Conversation
let handle_responses = time::timeout(Some(opts.timeout), async { | ||
let mut published: HashSet<EventId> = HashSet::new(); | ||
let mut not_published: HashMap<EventId, String> = HashMap::new(); | ||
let mut notifications = self.internal_notification_sender.subscribe(); |
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.
Maybe is enough to move the let mut notifications = self.internal_notification_sender.subscribe();
outside the time::timeout
, before the self.batch_msg(msgs, opts).await?;
. Should be cleaner as solution.
What do you think?
start to listen for OK msg immediately before event is sent this prevents the OK msg from being recieved before we start listening for it this bug was introduced in v0.28 and discovered when upgrading v0.27 ~> v0.29 in ngit (https://https://gitworkshop.dev/ngit) as it caused many intergration tests to fail
5e4901b
to
7362f7c
Compare
That's much more elegant! I've force pushed your suggestion to this branch. |
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.
ACK 7362f7c
Just published Make sure to bump it in your |
Thanks. They seem to be failing at points which use Also, possibly not related but clippy is warning about
for |
Can you point me where are the issues in the |
I found the |
Thanks :-) rust-nostr v0.29 upgrade branch running when running
The first thing the tool does with a fresh config (integration test conditions) is to fetch the users metadata and relays. this is where it intermittently fails to receive the events sent by the relay. The test times out before the end of the get_events_of timeout. You highlighted the function where this occurs. |
the clippy errors:
appear on these two lines: |
I tried to take a look but the most of time I receive this:
Always in the Regarding the warning: maybe is related to the size of
I'll try to re-write the |
Try running the The main branch passes CI: |
Ok, yes, I received that error. Bumping |
Released |
rust-nostr author suggested this might be a false positive rust-nostr/nostr#375 (comment)
rust-nostr author suggested this might be a false positive rust-nostr/nostr#375 (comment)
There were a few minor behavioral changes which were breaking other tests. I updated the test and they are all now passing, so I have merged the update to v0.29. Thanks for your assistance. |
start to listen for OK msg immediately before event is sent
this prevents the OK msg from being recieved
before we start listening for it
this bug was introduced in v0.28 and discovered when upgrading
v0.27 ~> v0.29 in ngit (https://https://gitworkshop.dev/ngit)
as it caused many intergration tests to fail
Description
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
just precommit
orjust check
before committingNew Features:
Bugfixes: