Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No inline jetstream msg processing, always queue inbound #4018

Merged
merged 1 commit into from Apr 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 1 addition & 15 deletions server/stream.go
Expand Up @@ -3670,21 +3670,7 @@ func (mset *stream) getDirectRequest(req *JSApiMsgGetRequest, reply string) {
// processInboundJetStreamMsg handles processing messages bound for a stream.
func (mset *stream) processInboundJetStreamMsg(_ *subscription, c *client, _ *Account, subject, reply string, rmsg []byte) {
hdr, msg := c.msgParts(rmsg)

// If we are not receiving directly from a client we should move this to another Go routine.
// Make sure to grab no stream or js locks.
if c.kind != CLIENT {
mset.queueInboundMsg(subject, reply, hdr, msg)
return
}

// This is directly from a client so process inline.
// If we are clustered we need to propose this message to the underlying raft group.
if mset.IsClustered() {
mset.processClusteredInboundMsg(subject, reply, hdr, msg)
} else {
mset.processJetStreamMsg(subject, reply, hdr, msg, 0, 0)
}
mset.queueInboundMsg(subject, reply, hdr, msg)
}

var (
Expand Down