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

hyperledger-labs / fabric-smart-client / 24961088813

26 Apr 2026 04:10PM UTC coverage: 66.939% (-0.04%) from 66.975%
24961088813

push

github

web-flow
fix(lazy): add read lock to lazyProvider.Length (#1329)

Resolves #1324.

lazyProvider.Length read len(v.cache) without holding cacheLock,
which is a data race against any concurrent write through Get,
Update, or Delete (all of which take cacheLock.Lock). The race
trips Go's runtime detector under -race.

Adds RLock/RUnlock around the read, matching what Peek already
does for cache reads, and adds TestLengthConcurrentWithWrites that
exercises Update / Delete / Length in parallel goroutines so the
race is caught by 'go test -race ./platform/common/utils/lazy/...'.

Signed-off-by: Matt Van Horn <mvanhorn@gmail.com>

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

21 existing lines in 5 files now uncovered.

26544 of 39654 relevant lines covered (66.94%)

3102.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/platform/view/services/storage/driver/sql/sqlite/errormapper.go


Source Not Available

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