Skip to content

Commit

Permalink
Restore comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
  • Loading branch information
Jarema committed Feb 2, 2023
1 parent 70c51ff commit e94752e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions server/consumer.go
Expand Up @@ -3053,6 +3053,7 @@ func (o *consumer) isFilteredMatch(subj string) bool {
}
// It's quicker to first check for non-wildcard filters, then
// iterate again to check for subset match.
// TODO(dlc) at speed might be better to just do a sublist with L2 and/or possibly L1.
for _, filter := range o.subjf {
if subjectIsSubsetMatch(subj, filter.subject) {
return true
Expand Down Expand Up @@ -4159,6 +4160,7 @@ func (o *consumer) selectStartingSeqNo() {
o.sseq = state.LastSeq
return
}
// If we are partitioned here this will be properly set when we become leader.
for _, filter := range o.subjf {
ss := o.mset.store.FilteredState(1, filter.subject)
filter.nextSeq = ss.Last
Expand Down
3 changes: 1 addition & 2 deletions server/jetstream_test.go
Expand Up @@ -19070,10 +19070,9 @@ func TestJetStreamConsumerMultipleSubjects(t *testing.T) {
})
require_NoError(t, err)

for i := 0; i < 20; i++ {
for i := 0; i < 20; i += 2 {
sendStreamMsg(t, nc, "events.created", fmt.Sprintf("created %v", i))
sendStreamMsg(t, nc, "data.processed", fmt.Sprintf("processed %v", i+1))
i++
}

_, err = mset.addConsumer(&ConsumerConfig{
Expand Down

0 comments on commit e94752e

Please sign in to comment.