mirror of https://github.com/milvus-io/milvus.git
fix: Data race in datacoord channel manager (#37866)
issue: #37865 Signed-off-by: Wei Liu <wei.liu@zilliz.com>pull/37911/head
parent
d7dcc752f1
commit
97a44b62fd
|
@ -449,6 +449,7 @@ func (m *ChannelManagerImpl) AdvanceChannelState(ctx context.Context) {
|
|||
standbys := m.store.GetNodeChannelsBy(WithAllNodes(), WithChannelStates(Standby))
|
||||
toNotifies := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(ToWatch, ToRelease))
|
||||
toChecks := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(Watching, Releasing))
|
||||
maxNum := len(m.store.GetNodes()) * paramtable.Get().DataCoordCfg.MaxConcurrentChannelTaskNumPerDN.GetAsInt()
|
||||
m.mu.RUnlock()
|
||||
|
||||
// Processing standby channels
|
||||
|
@ -458,7 +459,6 @@ func (m *ChannelManagerImpl) AdvanceChannelState(ctx context.Context) {
|
|||
|
||||
var (
|
||||
updatedToNotifies bool
|
||||
maxNum = len(m.store.GetNodes()) * paramtable.Get().DataCoordCfg.MaxConcurrentChannelTaskNumPerDN.GetAsInt()
|
||||
executingNum = len(toChecks)
|
||||
toNotifyNum = maxNum - executingNum
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue