Open sharnoff opened 1 year ago
This isn't a bug per se, but when we have a lot of VMs, this will impact the effectiveness of migration enough that it's worth fixing.
In particular, this line is the culprit:
https://github.com/neondatabase/autoscaling/blob/d574fbbb05d6f949510c70009ae7bfd3f83d73a5/pkg/plugin/run.go#L283
Looks like we can use https://pkg.go.dev/github.com/tidwall/btree#BTreeG.GetAt to implement this in O(log n).
Unassigning myself as I'm not currently working on this.
This isn't a bug per se, but when we have a lot of VMs, this will impact the effectiveness of migration enough that it's worth fixing.
In particular, this line is the culprit:
https://github.com/neondatabase/autoscaling/blob/d574fbbb05d6f949510c70009ae7bfd3f83d73a5/pkg/plugin/run.go#L283