mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 18:02:56 +00:00
Consider the case when the storage controller handles the re-attach of a node before the heartbeats detect that the node is back online. We still need to reconfigure the node (by calling `Service::node_configure`) to migrate attachments back onto the node. In order to determine if node reconfiguration is required, we call into `Node::get_availability_transition`. This commit updates the function to consider the transition from "node just re-attached" (with no utilisation score) to "node responded to the first heartbeat after a period of unavailablity" (with some utilisation score).