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

nats-io / nats-server / 10519998900

23 Aug 2024 12:03AM CUT coverage: 85.183% (-0.04%) from 85.225%
10519998900

push

github

web-flow
[IMPROVED] Do not load blocks unnecessarily when checking if we can skip ahead in LoadNextMsg(). (#5819)

When we would miss a LoadNextMsg() from the block associated with the
starting sequence, we would check if we could skip ahead. The logic for
this could load old blocks, behind where we were, if the psim fblk was
outdated, causing memory bloat for cache expiration time intervals.

We reworked this to load no blocks in the skip check since this is hot
path for LoadNextMsg() and the linear scan, if applicable, properly will
expire anything loaded that did not contain a match.

I tested that benchmarks were not affected.

`go test -v -run=XXX --bench=Benchmark_FileStoreLoadNext`

Signed-off-by: Derek Collison <derek@nats.io>

66247 of 77770 relevant lines covered (85.18%)

1143306.02 hits per line

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

50.59
/src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go


Source Not Available

The file "src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

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

© 2025 Coveralls, Inc