Conversation
|
The latest Buf updates on your PR. Results from workflow CI and Release / buf-check (pull_request).
|
|
Claude finished @alpe's task —— View job Comprehensive Code Review: HA Failover with RaftI've completed a detailed review of the HA failover implementation. Below are my findings organized by focus area. 1. Code Quality & Architecture
|
| ) | ||
|
|
||
| // failoverState collect the components to reset when switching modes. | ||
| type failoverState struct { |
There was a problem hiding this comment.
This type contains all stateful services that are re-reset when switching from sync to aggregator mode
| }) | ||
|
|
||
| // optional Raft node details | ||
| if raftNode != nil { |
There was a problem hiding this comment.
quick solution to add some maintenance function for the raft cluster. Probably proto makes more sense
| @@ -0,0 +1,17 @@ | |||
| package raft | |||
|
|
|||
| // todo: refactor to use proto | |||
There was a problem hiding this comment.
RaftBlockState is currently de- / serialized via json for transport via raft.
| } else if !isLeader && isCurrentlyLeader { // lost leadership | ||
| workerCancel() | ||
| n.logger.Info().Msg("lost leadership") | ||
| return ErrLeadershipLost |
There was a problem hiding this comment.
The node is shutdown in the downstream code to ensure clean state.
| logfile, err := os.Create(logfileName) | ||
| require.NoError(s.t, err) | ||
| errReader = io.NopCloser(io.TeeReader(errReader, logfile)) | ||
| outReader = io.NopCloser(io.TeeReader(outReader, logfile)) |
There was a problem hiding this comment.
I am storing logs to help tracing down issues. This works with non temporary work dirs only.
|
Closing in favour of #2814 |
🚧 WIP - early version
E2E test: test/e2e/failover_e2e_test.go
Overview