Skip to content

Conversation

@somdoron
Copy link
Contributor

No description provided.

@somdoron somdoron requested review from Copilot and keisar October 27, 2025 06:53
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 introduces state notification support to the Raft consensus implementation, allowing consumers to subscribe to leadership state changes. The implementation adds a new notification system that emits events when nodes step up to leadership, step down from leadership, or detect leader changes.

Key Changes:

  • Added StateNotification ADT with three variants: SteppedUp, SteppedDown, and LeaderChanged
  • Integrated a notification queue into the Raft core that publishes state transition events
  • Exposed state notifications as a ZStream for consumption by clients

Reviewed Changes

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

File Description
raft/src/main/scala/zio/raft/Types.scala Defines the StateNotification sealed trait with case objects/classes for different state transition events
raft/src/main/scala/zio/raft/Raft.scala Adds notification queue to Raft class, implements notification logic in state transition methods, and exposes stateNotifications stream

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

@somdoron somdoron requested a review from Copilot October 27, 2025 07:10
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

@somdoron somdoron merged commit 806a739 into unit-finance:main Oct 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant