Backport: Adjust service chain ownership when reassigning services between workers (#5435)#5506
Merged
bart-linera merged 11 commits intolinera-io:testnet_conwayfrom Feb 25, 2026
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Start and Stop messages now carry handoff-related fields. Update the service assignment, service removal, and messages table to match the code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
afck
approved these changes
Feb 25, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 25, 2026
## Motivation #5506 revealed a bug in the `ChainListener`, which is not exposed by the existing tests on `main` due to different handling of event subscriptions. The bug is that when the `ChainListener` stops listening to a chain, it doesn't remove it from the `event_subscriptions` map. ## Proposal Always remove a chain from `event_subscriptions` when no longer listening to it. ## Test Plan CI will catch regressions. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
If a service is reassign from worker A to worker B by the controller application, worker A should cease to be the owner of the service's chain, and worker B should become an owner.
Proposal
Upon reassignment, when telling worker A to stop running the service, worker A will add worker B as an owner and notify the main controller chain.
The main controller will then tell worker B to take over, telling it at which height on the service chain it became an owner. Worker B then waits until it synchronizes the service chain until that height, and when it's ready, it starts listening to the chain in FullChain mode and removes worker A as an owner.
Test Plan
test_controllerwas extended to reassign a service from one worker to another, and then check if the second worker properly handles a task request.Release Plan
Links