This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add a function to tell if a context subscribes to query events #147
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This can save us some work if the caller doesn't actually care about these events.
willscott
approved these changes
Apr 29, 2020
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.
doing these through the context continues to be non-obvious, but i guess it doesn't hurt to be efficient about it.
Well, it's still the simplest approach. These are supposed to be diagnostic events (which we're then relying on in tests...). |
... (which we're then relying on in dht commands and hence in return status of HTTP api) |
Stebalien
added a commit
to ipfs/kubo
that referenced
this pull request
May 9, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes #7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([#7276](#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 6, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 6, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 8, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 8, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 8, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
ralendor
pushed a commit
to ralendor/go-ipfs
that referenced
this pull request
Jun 8, 2020
Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: 1. Removes the 1 minute timeout for IPNS publishes (fixes ipfs#7244). 2. Backport a DHT fix to reduce CPU usage for canceled requests. 3. Fixes some timer leaks in the QUIC transport ([ipfs#2515](quic-go/quic-go#2515)). Full changelog: - github.com/ipfs/go-ipfs: - IPNS timeout patch from master ([ipfs#7276](ipfs#7276)) - github.com/libp2p/go-libp2p-core (v0.5.2 -> v0.5.3): - feat: add a function to tell if a context subscribes to query events ([libp2p/go-libp2p-core#147](libp2p/go-libp2p-core#147)) - github.com/libp2p/go-libp2p-kad-dht (v0.7.10 -> v0.7.11): - fix: optimize for the case where we're not subscribing to query events ([libp2p/go-libp2p-kad-dht#624](libp2p/go-libp2p-kad-dht#624)) - fix: don't spin when the event channel is closed ([libp2p/go-libp2p-kad-dht#622](libp2p/go-libp2p-kad-dht#622)) - github.com/libp2p/go-libp2p-routing-helpers (v0.2.2 -> v0.2.3): - fix: avoid subscribing to query events unless necessary ([libp2p/go-libp2p-routing-helpers#43](libp2p/go-libp2p-routing-helpers#43)) - github.com/lucas-clemente/quic-go (v0.15.5 -> v0.15.7): - reset the PTO when dropping a packet number space - move deadlineTimer declaration out of the Read loop - stop the deadline timer in Stream.Read and Write - fix buffer use after it was released when sending an INVALID_TOKEN error - create the session timer at the beginning of the run loop - stop the timer when the session's run loop returns
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This can save us some work if the caller doesn't actually care about these events.