Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

feat: add a function to tell if a context subscribes to query events #147

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

Stebalien
Copy link
Member

This can save us some work if the caller doesn't actually care about these events.

This can save us some work if the caller doesn't actually care about these events.
Copy link
Contributor

@willscott willscott left a 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.

@Stebalien
Copy link
Member Author

Well, it's still the simplest approach. These are supposed to be diagnostic events (which we're then relying on in tests...).

@Stebalien Stebalien merged commit a4b837b into master Apr 29, 2020
@Stebalien Stebalien deleted the feat/subscribes-to-events branch April 29, 2020 20:21
@willscott
Copy link
Contributor

... (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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants