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

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

Build:
Build:
LAST BUILD BRANCH: fix_code_coverage
DEFAULT BRANCH: main
Ran 29 Jul 2019 11:47PM 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:35PM UTC coverage: 91.019%. First build
3763

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>

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

15770 of 17326 relevant lines covered (91.02%)

79815.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3763.1 (GO111MODULE=off) 29 Jul 2019 11:47PM UTC 0
91.02
Travis Job 3763.1
Source Files on build 3763
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3763
  • b96cb5f9 on github
  • Next Build on reduce_memuse_routing (#3764)
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