Skip to content

Conversation

neilalexander
Copy link
Member

We should only return that the cache can be expired if the start sequence is the end of the block, otherwise we will repeatedly load and expire the cache of the same block in LoadNextMsgMulti. This results in a noticeable slowdown.

Fixes #7014.

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

We should only return that the cache can be expired if the start sequence
is the end of the block, otherwise we will continously load and expire
the cache in `LoadNextMsgMulti`.

Fixes #7014.

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander force-pushed the neil/firstmatchingmultiperf branch from 2793194 to 528de0c Compare June 27, 2025 17:14
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit 9d2e648 into main Jun 28, 2025
68 of 70 checks passed
@neilalexander neilalexander deleted the neil/firstmatchingmultiperf branch June 28, 2025 08:07
@wallyqs wallyqs changed the title Fix performance issue in firstMatchingMulti [FIXED] Fix performance issue in firstMatchingMulti Jun 30, 2025
neilalexander added a commit that referenced this pull request Jun 30, 2025
Includes the following:

- #7013
- #7009
- #7008
- #7015
- #7019
- #7021
- #7022

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Jul 2, 2025
To avoid regressions after #7015, to be added into Gauge.

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JetStream Consumer Subject Filtering Causes 99% Performance Degradation
2 participants