-
Notifications
You must be signed in to change notification settings - Fork 188
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
Block reconciliation if queue nearly full #2185
Conversation
...tyService/src/main/java/com/hubspot/singularity/scheduler/SingularityTaskReconciliation.java
Outdated
Show resolved
Hide resolved
...tyService/src/main/java/com/hubspot/singularity/scheduler/SingularityTaskReconciliation.java
Outdated
Show resolved
Hide resolved
...tyService/src/main/java/com/hubspot/singularity/scheduler/SingularityTaskReconciliation.java
Show resolved
Hide resolved
let's test in staging, but looks good 👍 . We can do something like shrink the queue size really small + make an example request and scale it to something ridiculous like 300 to hopefully trigger and see it in action |
@@ -647,4 +647,12 @@ public boolean hasRoomForMoreUpdates() { | |||
statusUpdatesExecutor.getExecutorService() | |||
); | |||
} | |||
|
|||
public double getQueueFullness() { | |||
LOG.info("Queue size: {}", statusUpdatesExecutor.getQueue().size()); |
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.
should I add more, like queue limit and the computation of queue fullness?
I tried adding unit tests, but the status queue was still processing them faster than I could run a reconciliation check so I wasn't able to hit the blocking conditional; and if I tried to create too many tasks, I was blocked by testing resources. |
🚢 |
🚢 |
If the queue is nearly full, adding a number of tasks for reconciliation can put us into a loop of lag as the scheduler tries to go through tasks and more reconciliation attempts.