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

[jsz] Add StreamLeaderOnly filter option #5704

Merged
merged 1 commit into from
Jul 27, 2024
Merged

[jsz] Add StreamLeaderOnly filter option #5704

merged 1 commit into from
Jul 27, 2024

Conversation

bruth
Copy link
Member

@bruth bruth commented Jul 26, 2024

The stream state and replica info is only guaranteed to be accurate when returned by the leader of a given stream. This new option returns stream details only for the stream in which the server is the leader for that stream. For systems with many streams this can significantly reduce the amount of data returned when scraping across all servers since non-leader details will likely be ignored.

Fix #5698

The stream state and replica info is only guaranteed to be accurate
when returned by the leader of a given stream. This new option
returns stream details only for the stream in which the server
is the leader for that stream. For systems with many streams this
can significantly reduce the amount of data returned when scraping
across all servers since non-leader details will likely be ignored.

Fix #5698

Signed-off-by: Byron Ruth <byron@nats.io>
@bruth bruth requested a review from a team as a code owner July 26, 2024 11:51
@bruth
Copy link
Member Author

bruth commented Jul 26, 2024

Thinking about this a bit more, for the cases that a leader is not elected/available for some reason, is the output of JSZ to not set the cluster leader field? If so, then having this option set would never return those cases by any of the servers.

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

@derekcollison derekcollison merged commit 4699070 into main Jul 27, 2024
5 checks passed
@derekcollison derekcollison deleted the issue-5698 branch July 27, 2024 02:23
bruth added a commit that referenced this pull request Jul 30, 2024
Includes the following:

* #5602
* #5672
* #5668
* #5607
* #5687
* #5695
* #5697
* #5704
* #5706
* #5709
* #5710
* #5713
* #5719

Some PRs specifically excluded:

* #5707 — based on a 2.11 NRG
PR
* #5690 — continue to allow
Go 1.20 for 2.10.x
* Various other NRG PRs which are higher risk and destined for 2.11
instead
This pull request was closed.
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.

Add JSZ filter to return stream/consumer details only if the server is the leader
2 participants