Skip to content

fix(framework): Make RUNNING transition atomic across replicas#6792

Open
psfoley wants to merge 10 commits intomainfrom
atomic-run-claim-fix
Open

fix(framework): Make RUNNING transition atomic across replicas#6792
psfoley wants to merge 10 commits intomainfrom
atomic-run-claim-fix

Conversation

@psfoley
Copy link
Member

@psfoley psfoley commented Mar 18, 2026

Issue

Description

Related issues/PRs

Proposal

Explanation

Checklist

  • Implement proposed change
  • Write tests
  • Update documentation
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

psfoley added 2 commits March 18, 2026 10:50
Signed-off-by: Patrick Foley <patrick@flower.ai>
Copilot AI review requested due to automatic review settings March 18, 2026 17:55
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make the STARTING -> RUNNING run-status transition safe under multi-replica contention in the SQL-based LinkState implementation, and adds concurrent tests to validate uniqueness/claim behavior across SQLite-backed replicas.

Changes:

  • Add an atomic UPDATE ... WHERE ... RETURNING claim path for Status.RUNNING transitions in SqlLinkState.update_run_status.
  • Improve/standardize an error log message related to invalid sub_status values.
  • Add multi-threaded, multi-replica SQLite tests to ensure unique claiming of messages and the RUNNING transition.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
framework/py/flwr/server/superlink/linkstate/sql_linkstate.py Introduces an atomic update path for claiming STARTING -> RUNNING across replicas and adjusts an error message.
framework/py/flwr/server/superlink/linkstate/linkstate_test.py Adds file-based SQLite concurrency tests to validate unique claiming under contention and atomic RUNNING transitions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

psfoley and others added 8 commits March 18, 2026 14:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants