Skip to content
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

fix: don't spin when the event channel is closed #622

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

Stebalien
Copy link
Member

This will eventually exit when the query completes, but we could spin for a
while in the mean-time and prevent other goroutines from being scheduled.

This will eventually exit when the query completes, but we could spin for a
while in the mean-time and prevent other goroutines from being scheduled.
@willscott
Copy link
Contributor

=== RUN   TestHungRequest
    TestHungRequest: ext_test.go:70: GetClosestPeers should not have returned yet
--- FAIL: TestHungRequest (0.19s)

@Stebalien Stebalien merged commit 6dee1e5 into master Apr 29, 2020
@Stebalien
Copy link
Member Author

We'll have to debug that later...

@Stebalien Stebalien deleted the fix/evt-channel-closed branch April 29, 2020 20:33
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants