You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
services/worker-manager/src/worker-scanner.js needs to scan non-stopped workers to see what they're up to. Right now, it scans all workers and just ignores those with a 'stopped' status, but that's pretty slow. Let's write a function that returns just the necessary columns, and add an index on state while we're at it.
The text was updated successfully, but these errors were encountered:
In our discussion we were thinking of using a different DB function for src/provisioner.js, but looking at the seen function there, it
sums capacity by state and worker pool
tracks seen providerIds for each worker pool
only cares about non-stopped workers
It's probably easier to continue to do this in JS with the updated method described in this issue, than to implement a custom DB function that does all of the above.
The fact that currently we're looping over the workers table to calculate the existing capacity is probabyl causing us to over-provision slightly when the table is modified by the scanner concurrently to us counting in the provisioner. Let's bump the priority of doing this query as described here.
I didn't add it at first since it seemed slightly off-topic and doesn't fit nicely into either epic but I think it will happen as part of my refactor so I'll add it.
services/worker-manager/src/worker-scanner.js
needs to scan non-stopped workers to see what they're up to. Right now, it scans all workers and just ignores those with a 'stopped' status, but that's pretty slow. Let's write a function that returns just the necessary columns, and add an index onstate
while we're at it.The text was updated successfully, but these errors were encountered: