mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Fix bad merge for prior PR which caused more stalls (#3630)
Some checks are pending
Dendrite / Unit tests (push) Waiting to run
Dendrite / WASM build test (push) Waiting to run
Dendrite / Linting (push) Waiting to run
Dendrite / Build for Linux (push) Waiting to run
Dendrite / Build for Windows (push) Waiting to run
Dendrite / Initial tests passed (push) Blocked by required conditions
Dendrite / Integration tests (push) Blocked by required conditions
Dendrite / Upgrade tests (push) Blocked by required conditions
Dendrite / Upgrade tests from HEAD-2 (push) Blocked by required conditions
Dendrite / Sytest (SQLite Cgo) (push) Blocked by required conditions
Dendrite / Sytest (SQLite native) (push) Blocked by required conditions
Dendrite / Complement (PostgreSQL) (push) Blocked by required conditions
Dendrite / Complement (SQLite native) (push) Blocked by required conditions
Dendrite / Sytest (PostgreSQL) (push) Blocked by required conditions
Dendrite / Update Docker images (push) Blocked by required conditions
Dendrite / Complement (SQLite Cgo) (push) Blocked by required conditions
Dendrite / Integration tests passed (push) Blocked by required conditions
Some checks are pending
Dendrite / Unit tests (push) Waiting to run
Dendrite / WASM build test (push) Waiting to run
Dendrite / Linting (push) Waiting to run
Dendrite / Build for Linux (push) Waiting to run
Dendrite / Build for Windows (push) Waiting to run
Dendrite / Initial tests passed (push) Blocked by required conditions
Dendrite / Integration tests (push) Blocked by required conditions
Dendrite / Upgrade tests (push) Blocked by required conditions
Dendrite / Upgrade tests from HEAD-2 (push) Blocked by required conditions
Dendrite / Sytest (SQLite Cgo) (push) Blocked by required conditions
Dendrite / Sytest (SQLite native) (push) Blocked by required conditions
Dendrite / Complement (PostgreSQL) (push) Blocked by required conditions
Dendrite / Complement (SQLite native) (push) Blocked by required conditions
Dendrite / Sytest (PostgreSQL) (push) Blocked by required conditions
Dendrite / Update Docker images (push) Blocked by required conditions
Dendrite / Complement (SQLite Cgo) (push) Blocked by required conditions
Dendrite / Integration tests passed (push) Blocked by required conditions
Due to a bad merge, timeouts were not early-returning and so could cause a stall in the roomserver. Fix the bad merge and early-out. Minor fix to a bad merge of my change for #3484 This also incorporates a suggested tweak to the prior PR #3588 to avoid holding the lock unnecessarily. ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below](https://element-hq.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Vivianne Langdon <puttabutta@gmail.com>` --------- Signed-off-by: Vivianne Langdon <puttabutta@gmail.com>
This commit is contained in:
parent
5e05f3090b
commit
0945374736
1 changed files with 7 additions and 1 deletions
|
@ -292,11 +292,17 @@ func (w *worker) _next() {
|
||||||
// inside the lock, let's check if the ephemeral consumer saw something new!
|
// inside the lock, let's check if the ephemeral consumer saw something new!
|
||||||
// If so, we do have new messages after all, they just came at a bad time.
|
// If so, we do have new messages after all, they just came at a bad time.
|
||||||
if w.ephemeralSeq > w.durableSeq {
|
if w.ephemeralSeq > w.durableSeq {
|
||||||
w.Act(nil, w._next)
|
|
||||||
w.Unlock()
|
w.Unlock()
|
||||||
|
w.Act(nil, w._next)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err = w.subscription.Unsubscribe(); err != nil {
|
||||||
|
logrus.WithError(err).Errorf("Failed to unsubscribe to stream for room %q", w.roomID)
|
||||||
|
}
|
||||||
|
w.subscription = nil
|
||||||
w.Unlock()
|
w.Unlock()
|
||||||
|
return
|
||||||
case nats.ErrConsumerDeleted, nats.ErrConsumerNotFound:
|
case nats.ErrConsumerDeleted, nats.ErrConsumerNotFound:
|
||||||
w.Lock()
|
w.Lock()
|
||||||
defer w.Unlock()
|
defer w.Unlock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue