• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-streaming-server / 1871 / 2
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: add-eol-note
DEFAULT BRANCH: main
Ran 26 Apr 2019 08:35PM UTC
Files 25
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Apr 2019 08:26PM UTC coverage: 91.857% (-0.1%) from 92.006%
1871.2

Pull #813

travis-ci

web-flow
[FIXED] Clustering: possible deadlock on sub/conn close

There was a wrong assumption that calling raft.Apply() without
waiting on the future result would be non blocking. This is not
the case. RAFT internally uses go channels and there may be cases
when a receiver on a channel is busy and so sending to that channel
will block.

This is what was happening. RAFT would invoke the streaming server
code to apply the replication of a connection close. In this process
we try to remove subscriptions of that connection. This requires
the subStore lock. However, another go routine may be holding that
lock (and possibly subscription's lock, queue state, etc..) and
at the same time call raft.Apply() to replicate an aggregate of
subscription's sent/ack operations. In some cases this would actually
block, causing the deadlock.

Reworked handling of replication of sub's sent/ack events so that
this does not happen anymore.

Resolves #812

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Pull Request #813: [FIXED] Clustering: possible deadlock on sub/conn close

11393 of 12403 relevant lines covered (91.86%)

46896.41 hits per line

Source Files on job 1871.2
  • Tree
  • List 0
  • Changed 19
  • Source Changed 1
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1657
  • Travis Job 1871.2
  • 94165032 on github
  • Prev Job for on fix_deadlock (#1864.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc