-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: infer correct shard in statefulset setup (#17124, #17016) #17167
Merged
ishitasequeira
merged 15 commits into
argoproj:master
from
woehrl01:fix-processing-shards
Feb 13, 2024
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7f6a08a
fix: infer correct shard in statefulset setup
woehrl01 14b7ec1
fix the case if only a single replica
woehrl01 80951b9
fix: resolving pointer on shard compare
woehrl01 a557f8d
fix: add readlock for cluster accessor
woehrl01 9f50589
fix: use defer to protect access of 'shard'
woehrl01 1bb3db9
fix: revert locking in getclusteraccessor
woehrl01 d586b63
Merge remote-tracking branch 'origin/master' into fix-processing-shards
woehrl01 a779b1c
fix: handle nil shard case
woehrl01 98e93b6
fix: handle any nil shard value as false
woehrl01 d1f185d
fix: handle nil case and fix another missing pointer dereference
woehrl01 08adee2
revert
woehrl01 5b52b6d
fix: added tests and fixed some behaviour bugs
woehrl01 4fa4cc2
test: add test to validate that Shard value is not overriden
woehrl01 81c920d
fix: added tests and fixe the case when server is changed inside a se…
woehrl01 4194e89
tests: add test cases for infering the shard logic
woehrl01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous PR seemed to update the cluster shard value in the cache and not only the shard number in the Shards object.
I think the goal was to persist the computed shard in the cache so we do not need to call
sharding.getClusterShard(c)
and recompute the shard number every timeupdateDistribution()
is called. Basically, once the controller starts managing a cluster, it will manage it forever.Now with the dynamic cluster sharding, I think you are right. We do have to recompute all the cluster shards whenever a cluster is added/modified/deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agaudreault Thanks for confirming, the problem with "controller starts managing a cluster, it will manage it forever." is that this does not work properly as every shard could have a different view on the cluster. If clusters are added/removed and stateful set controllers are restarting at different time intervals (e.g. spot interruptions)