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

Improve finding the last sourced message for each source of a stream #4935

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

jnmoyne
Copy link
Contributor

@jnmoyne jnmoyne commented Jan 10, 2024

Improves how the sequence number of the last sourced message is found for all the stream's sources (in a single pass rather that individual passes for each source).

Signed-off-by: Jean-Noël Moyne jnmoyne@gmail.com

@jnmoyne jnmoyne requested a review from a team as a code owner January 10, 2024 01:10
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM - Check my one comment.

server/stream.go Show resolved Hide resolved
@derekcollison
Copy link
Member

You have some basic go fmt issues etc you need to fix..

@derekcollison
Copy link
Member

server/stream.go:1823: File is not gofmt-ed with -s (gofmt) for iname, _ := range needsStartingSeqNum {

@jnmoyne jnmoyne force-pushed the jnm/source_first_seq branch 4 times, most recently from 90b3d1e to 7a45f80 Compare January 10, 2024 05:03
server/stream.go Outdated Show resolved Hide resolved
server/stream.go Outdated Show resolved Hide resolved
…one go rather than repeatedly

Consolidation to avoid code duplication between setStartingSequenceForSource and setStartingSequenceForSources

Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
@derekcollison derekcollison merged commit cf5bd9f into main Jan 10, 2024
4 checks passed
@derekcollison derekcollison deleted the jnm/source_first_seq branch January 10, 2024 05:55
neilalexander added a commit that referenced this pull request Jan 10, 2024
Cherry-pick the following PRs into the 2.10.8 release branch:

* #4937
* #4935 
* #4938 
* #4940

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.

None yet

2 participants