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

feat: Implement rebalance queue and config option #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertkotcher
Copy link

@robertkotcher robertkotcher commented Oct 24, 2022

Context: In Argo, semaphores are implemented by wrapping Go's semaphore with some additional stuff. At the moment this "additional stuff" is mainly around prioritizing lock distribution to higher-priority workflows first. This can be seen in semaphore.go, which shows how the priority queue is utilized in tryAcquire before trying to acquire the lock using the more primitive semaphore.

I also recommend checking out sync_manager to get a sense for how semaphores fit into the bigger Argo / Kubernetes picture.

This PR: I want to create a PR that is as low-touch as possible, so we can continue to rebase with Argo as long as possible with as little friction as possible. My approach is to create a new type of queue that can be dropped into semaphore.go. This queue will have a new strategy: instead of being a plain old priority queue, we want the queue to distribute locks based on who is currently under-represented in the set of locks that are currently acquired.

@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 5 times, most recently from 76a5b32 to f09992d Compare October 26, 2022 15:09
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 9 times, most recently from 66c8925 to 257d7c7 Compare November 7, 2022 20:11
OWNERS Outdated
- tczhao
- xianlubird
Copy link
Author

Choose a reason for hiding this comment

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

sorry, not sure how this got here.. trying to remove

@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 6 times, most recently from 2e1e68e to bfb748c Compare November 8, 2022 19:22
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 2 times, most recently from 24cf551 to bac4b4b Compare November 15, 2022 21:13
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 3 times, most recently from 95ad542 to 13a9355 Compare December 7, 2022 22:04
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 3 times, most recently from ea7df7e to 892fa6d Compare December 16, 2022 18:29
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch from 892fa6d to b7d0422 Compare January 17, 2023 18:04
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch from b7d0422 to cd0b6f4 Compare February 7, 2023 17:20
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch from cd0b6f4 to 32e4507 Compare February 23, 2023 10:16
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch 5 times, most recently from 10a201f to e579537 Compare April 4, 2023 20:31
Signed-off-by: Robert Kotcher <rkotcher+1@gmail.com>
@robertkotcher robertkotcher force-pushed the semaphore-rebalance-queue branch from e579537 to 5422557 Compare April 4, 2023 23:52
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.

1 participant