fix(master): simplify the process of followe read jugement and resolve issues

Signed-off-by: leonrayang <chl696@sina.com>
This commit is contained in:
leonrayang 2024-07-08 15:09:47 +08:00 committed by AmazingChi
parent 88e0dc05dd
commit 93c516105f

View File

@ -79,6 +79,7 @@ func (m *Server) isFollowerRead(r *http.Request) (followerRead bool) {
followerRead = false
if r.URL.Path == proto.ClientDataPartitions && !m.partition.IsRaftLeader() {
if volName, err := parseAndExtractName(r); err == nil {
log.LogInfof("action[interceptor] followerRead vol[%v]", volName)
if followerRead = m.cluster.followerReadManager.IsVolViewReady(volName); followerRead {