mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-15 02:53:07 +08:00
An upgrade used to take the running version down before the new one was up: registry.Replace went first, the domain activators deactivated the old version and then activated the new one, and a failure part way (a vendor file that does not parse, a process that exits at start) left the plugin missing until a retry succeeded. A host process that failed to start also left the domains on the new manifest routing calls to the old process. Activators now stage a version and commit it in two steps. Every activator stages the new version without changing what it serves (domains check and build their registrations, the host starts the process, remote checks the service); only when all of them staged does the registry swap and each commit, runtimes first. If any stage fails, the staged ones abort and the previous version keeps running, with the failed version and reason in the node status (upgradeVersion/upgradeError) until it loads or is rolled back. Domain registries get check methods so a commit cannot fail, and a commit registers the new entries before removing the ones the new version dropped, so there is no gap. The model runtime splits RegisterPlugin into PreparePlugin and InstallPlugin. Processes and endpoints staged but not committed no longer report health for the plugin. Moves between runtimes and kubernetes rollouts keep their current behaviour for now.