-
Notifications
You must be signed in to change notification settings - Fork 565
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
On each metadata change, the topology of partition followers grows in the Gateway's broker topology #8724
Labels
kind/bug
Categorizes an issue or PR as a bug
scope/gateway
Marks an issue or PR to appear in the gateway section of the changelog
severity/low
Marks a bug as having little to no noticeable impact for the user
version:8.1.0
Marks an issue as being completely or in parts released in 8.1.0
Comments
Thanks for the clear report, seems like a low hanging fruit and we should do it (under the assumption it's a quick fix). |
10 tasks
zeebe-bors-camunda bot
added a commit
that referenced
this issue
Sep 5, 2022
10255: fix(gateway): store followers and inactive nodes in sets r=megglos a=megglos Previous use of lists resulted in unbounded growth due to duplication of the same broker ids. ## Description Replaces the usage of Lists to keep track of followers and inactiveNodes in the BrokerClusterState with Sets to prevent duplication on arbitrary metadata updates. ## Related issues closes #8724 Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
zeebe-bors-camunda bot
added a commit
that referenced
this issue
Sep 5, 2022
10255: fix(gateway): store followers and inactive nodes in sets r=megglos a=megglos Previous use of lists resulted in unbounded growth due to duplication of the same broker ids. ## Description Replaces the usage of Lists to keep track of followers and inactiveNodes in the BrokerClusterState with Sets to prevent duplication on arbitrary metadata updates. ## Related issues closes #8724 Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
zeebe-bors-camunda bot
added a commit
that referenced
this issue
Sep 5, 2022
10255: fix(gateway): store followers and inactive nodes in sets r=megglos a=megglos Previous use of lists resulted in unbounded growth due to duplication of the same broker ids. ## Description Replaces the usage of Lists to keep track of followers and inactiveNodes in the BrokerClusterState with Sets to prevent duplication on arbitrary metadata updates. ## Related issues closes #8724 Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
This was referenced Sep 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes an issue or PR as a bug
scope/gateway
Marks an issue or PR to appear in the gateway section of the changelog
severity/low
Marks a bug as having little to no noticeable impact for the user
version:8.1.0
Marks an issue as being completely or in parts released in 8.1.0
Describe the bug
In a long-running scenario, where the Gateway is up and running for a long time, the heap memory consumption of
BrokerTopologyManager
grows over time:Especially, the property
partitionFollowers
grows the most:Whenever there is a metadata change, the Gateway gets notified about it by the respective broker. The Gateway will update the topology information accordingly. Thereby, it will update the list of followers for a specific partition every time. Basically, it will always add the broker to the list of followers for a partition:
https://github.com/camunda-cloud/zeebe/blob/df800d41fcc307817b692d17d9c87247f2825516/gateway/src/main/java/io/camunda/zeebe/gateway/impl/broker/cluster/BrokerClusterStateImpl.java#L90-L97
It only removes the broker from the list of followers for a specific partition if the broker transitions to another role then
FOLLOWER
. Meaning, if a broker remains all the time asFOLLOWER
for a specific partition but other metadata changes (like terms or the healthy state) overtime frequently, the broker is added multiple times to the list of followers for that specific partition:The same applies to the property
partitionInactiveNodes
:https://github.com/camunda-cloud/zeebe/blob/df800d41fcc307817b692d17d9c87247f2825516/gateway/src/main/java/io/camunda/zeebe/gateway/impl/broker/cluster/BrokerClusterStateImpl.java#L99-L106
To Reproduce
Expected behavior
BrokerTopologyManager
doesn't grow over time.Environment:
The text was updated successfully, but these errors were encountered: