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

nats-io / nats-server / 9833653505
83%

Build:
DEFAULT BRANCH: main
Ran 08 Jul 2024 05:33AM UTC
Jobs 1
Files 55
Run time 1min
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

07 Jul 2024 08:01PM UTC coverage: 85.21% (+0.05%) from 85.159%
9833653505

push

github

web-flow
Fixes for filestore FSS state (#5616)

This PR contains some bug-fixes for the filestore FSS state.

First, if the filter provided is `_EMPTY_` then we need to overwrite it
to `>` for the stree functions to work, but we failed to set `wc` when
doing so. This could affect the decision on whether to linear-scan or
not. We will now set `wc` too in this case.

Second, if the FSS only contains a single subject then we may not
correctly set `isAll` if the filter contained a wildcard, as `Find` does
not work with wildcards and therefore wouldn't match the single subject.
Updated to use `Match` instead, so that it correctly uses wildcards.

Third, replaces `Match(>)` with `Iter` in `enforceMsgPerSubjectLimit`,
not because it is behaviourally different, but because we need to walk
the entire stree anyway and `Iter` saves CPU cycles by skipping the
match step.

Fourth, updates the bounds checking on various functions that use `Find`
so that the logic matches the `Match` equivalents. This also matters in
particular in `SubjectsState` which could fail altogether when the
filter was a subject literal rather than a wildcard and the `psim` was
out-of-date/needing update.

Fifth, in `NumPending` and in `filteredPendingLocked` when matching the
FSS state, if we find a partial, don't process any further matches after
that. This bug was introduced in #5559 as there used to be a `break`
there, whereas now the `Match` that replaces it can't be interrupted in
the same way.

Signed-off-by: Neil Twigg <neil@nats.io>

65998 of 77453 relevant lines covered (85.21%)

992051.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9833653505.1 08 Jul 2024 05:33AM UTC 0
85.21
GitHub Action Run
Source Files on build 9833653505
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9833653505
  • 79564942 on github
  • Prev Build on main (#9824661793)
  • Next Build on main (#9851100366)
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