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

hyperledger-labs / fabric-smart-client / 26521406930
71%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 03:43PM UTC
Jobs 15
Files 539
Run time 9min
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

pending completion
26521406930

push

github

web-flow
fix(grpc): cache *grpc.ClientConn per (service, network) in ClientProvider (#1483)

* fix(grpc): cache *grpc.ClientConn per (service, network) in ClientProvider

ClientProvider.NotificationServiceClient and QueryServiceClient called grpc.NewClient on every invocation. grpc.NewClient spawns several long-lived goroutines per ClientConn (resolver watcher, callback serializers, http2 reader/writer, balancer); when downstream callers invoke these on the hot path -- e.g. fabric-token-sdk's qe.Executor calls QueryServiceClient on every state query -- the goroutine count grows linearly with throughput and the underlying connections leak.

Cache *grpc.ClientConn per (service, network) using two sync.Maps. The first call dials and stores; subsequent calls return the cached connection. Under a benign cold-start race two callers may both dial; the loser closes its connection and returns the winner's via LoadOrStore. Closing a connection before any RPC has been issued is safe per grpc.ClientConn.Close semantics.

A goroutine-leak guard test drives the cached provider and the previous dial-per-call behavior against one real server with identical usage and asserts the cached path adds ~no goroutines while dialing per call leaks a connection's worth each time (0 vs 240 goroutines over 30 calls locally).

Signed-off-by: Evan <evanyan@sign.global>

---------

Signed-off-by: Evan <evanyan@sign.global>
Signed-off-by: Marcus Brandenburger <mbrandenburger@users.noreply.github.com>
Co-authored-by: Marcus Brandenburger <mbrandenburger@users.noreply.github.com>

28269 of 39849 relevant lines covered (70.94%)

3079.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 itest-fabric-twonets - 26521406930.1 27 May 2026 03:48PM UTC 477
27.34
GitHub Action Run
2 itest-fabricx-iou - 26521406930.2 27 May 2026 03:43PM UTC 506
26.45
GitHub Action Run
3 itest-fabric-stoprestart - 26521406930.3 27 May 2026 03:51PM UTC 477
29.19
GitHub Action Run
4 itest-fsc-stoprestart - 26521406930.4 27 May 2026 03:46PM UTC 275
28.8
GitHub Action Run
5 itest-fsc-pingpong - 26521406930.5 27 May 2026 03:49PM UTC 275
30.39
GitHub Action Run
6 itest-fabricx-deployment - 26521406930.6 27 May 2026 03:43PM UTC 504
26.14
GitHub Action Run
7 itest-fabric-atsa - 26521406930.7 27 May 2026 03:50PM UTC 477
40.69
GitHub Action Run
8 utest-postgres - 26521406930.8 27 May 2026 03:44PM UTC 538
7.5
GitHub Action Run
9 itest-fabric-iou - 26521406930.9 27 May 2026 03:51PM UTC 487
37.84
GitHub Action Run
10 itest-fabric-events - 26521406930.10 27 May 2026 03:47PM UTC 482
25.78
GitHub Action Run
11 itest-fabricx-simple - 26521406930.11 27 May 2026 03:43PM UTC 504
25.16
GitHub Action Run
12 utest - 26521406930.12 27 May 2026 03:45PM UTC 538
50.91
GitHub Action Run
13 itest-fabricx-multiendorsement - 26521406930.13 27 May 2026 03:44PM UTC 504
26.11
GitHub Action Run
14 itest-fabric-iouhsm - 26521406930.14 27 May 2026 03:50PM UTC 487
37.21
GitHub Action Run
15 itest-fabric-atsachaincode - 26521406930.15 27 May 2026 03:48PM UTC 482
28.3
GitHub Action Run
Source Files on build 26521406930
  • Tree
  • List 539
  • Changed 28
  • Source Changed 1
  • Coverage Changed 28
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26521406930
  • abf33046 on github
  • Prev Build on main (#26439324389)
  • Delete
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