File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
raft/src/main/scala/zio/raft Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -913,12 +913,13 @@ class Raft[S, A <: Command](
913913 for
914914 lastIndex <- logStore.lastIndex
915915 isPendingRead <- raftState.modify {
916- case l : Leader [S ] if lastIndex > l.lastApplied => (Right (true ), l.withPendingRead(PendingReadEntry [S ](r.promise, lastIndex)))
916+ case l : Leader [S ] if lastIndex > l.lastApplied =>
917+ (Right (true ), l.withPendingRead(PendingReadEntry [S ](r.promise, lastIndex)))
917918
918- // TODO (eran): when leader validation is implemented, we should use it here instead
919- case l : Leader [S ] => (Right (false ), l)
920- case f : Follower [S ] => (Left (NotALeaderError (f.leaderId)), f)
921- case c : Candidate [S ] => (Left (NotALeaderError (None )), c)
919+ // TODO (eran): when leader validation is implemented, we should use it here instead
920+ case l : Leader [S ] => (Right (false ), l)
921+ case f : Follower [S ] => (Left (NotALeaderError (f.leaderId)), f)
922+ case c : Candidate [S ] => (Left (NotALeaderError (None )), c)
922923 }
923924 _ <- isPendingRead match
924925 case Right (true ) => ZIO .unit
You can’t perform that action at this time.
0 commit comments