mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(shardnode): check readIndexFunc loaded in shard when preRWCheck
with: #1000167662 Signed-off-by: xiejian <xiejian3@oppo.com>
This commit is contained in:
parent
daf016636f
commit
413c1de3c2
@ -1049,7 +1049,7 @@ func (s *shardState) splitStopWriting() {
|
||||
}
|
||||
|
||||
func (s *shardState) prepRWCheck(ctx context.Context) error {
|
||||
if atomic.LoadUint32(&s.restartLeaderReadIndex) == needReadIndex {
|
||||
if atomic.LoadUint32(&s.restartLeaderReadIndex) == needReadIndex && s.readIndexFunc != nil {
|
||||
if err := s.readIndexFunc(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user