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

nats-io / nats-server / 3764
91%
main: 83%

Build:
Build:
LAST BUILD BRANCH: fix_code_coverage
DEFAULT BRANCH: main
Ran 30 Jul 2019 12:14AM UTC
Jobs 1
Files 27
Run time 4s
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

29 Jul 2019 11:54PM UTC coverage: 91.016% (-0.003%) from 91.019%
3764

push

travis-ci

kozlovic
[FIXED] Reduce memory usage on routes

When a route receives a message, it uses a thread local cache to
find the account and subscriptions match for a given subject.
When not found, an entry is added to this cache. The problem is
that this cache will reference subscriptions that in turn
reference connections.
When the subscriptions/connections are closed, this thread local
cannot be purged from those closed subscriptions (since it is
thread local - no lockin is used).
The real issue is that connection's buffer was not set to nil on
close, which then could cause more than expected memory to be
still referenced. Setting the buffer to nil will help reduce the
memory being used.
When an entry is added to the cache, the cache may reach a size
that will cause the server to prune some entries. From time to
time, the cache will be scanned to look for entries that contain
only closed subscriptions and remove those.

Resolves #1082

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>

42 of 42 new or added lines in 1 file covered. (100.0%)

15774 of 17331 relevant lines covered (91.02%)

79983.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3764.1 (GO111MODULE=off) 30 Jul 2019 12:14AM UTC 0
91.02
Travis Job 3764.1
Source Files on build 3764
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3764
  • 887e744d on github
  • Prev Build on reduce_memuse_routing (#3763)
  • Next Build on reduce_memuse_routing (#3770)
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