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))
|
standbys := m.store.GetNodeChannelsBy(WithAllNodes(), WithChannelStates(Standby))
|
||||||
toNotifies := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(ToWatch, ToRelease))
|
toNotifies := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(ToWatch, ToRelease))
|
||||||
toChecks := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(Watching, Releasing))
|
toChecks := m.store.GetNodeChannelsBy(WithoutBufferNode(), WithChannelStates(Watching, Releasing))
|
||||||
|
maxNum := len(m.store.GetNodes()) * paramtable.Get().DataCoordCfg.MaxConcurrentChannelTaskNumPerDN.GetAsInt()
|
||||||
m.mu.RUnlock()
|
m.mu.RUnlock()
|
||||||
|
|
||||||
// Processing standby channels
|
// Processing standby channels
|
||||||
|
@ -458,7 +459,6 @@ func (m *ChannelManagerImpl) AdvanceChannelState(ctx context.Context) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
updatedToNotifies bool
|
updatedToNotifies bool
|
||||||
maxNum = len(m.store.GetNodes()) * paramtable.Get().DataCoordCfg.MaxConcurrentChannelTaskNumPerDN.GetAsInt()
|
|
||||||
executingNum = len(toChecks)
|
executingNum = len(toChecks)
|
||||||
toNotifyNum = maxNum - executingNum
|
toNotifyNum = maxNum - executingNum
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue