Skip to content

Commit

Permalink
Fix subtle bug introduced by defining leaf nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
chencs committed Aug 30, 2024
1 parent 385667e commit 1b23c2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scheduler/queue/tenant_querier_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func (tqa *tenantQuerierAssignments) dequeueSelectNode(node *Node) (*Node, bool)
return nil, true
}

checkedAllNodes := node.childrenChecked == len(node.queueMap)+1 // must check local queue as well
checkedAllNodes := node.childrenChecked == len(node.queueMap) // must check local queue as well

// advance queue position for dequeue
tqa.tenantOrderIndex++
Expand Down Expand Up @@ -484,7 +484,7 @@ func (tqa *tenantQuerierAssignments) dequeueSelectNode(node *Node) (*Node, bool)
continue
}

checkedAllNodes = node.childrenChecked == len(node.queueMap)+1
checkedAllNodes = node.childrenChecked == len(node.queueMap)

// if the tenant-querier set is nil, any querier can serve this tenant
if tqa.tenantQuerierIDs[tenantID] == nil {
Expand Down

0 comments on commit 1b23c2e

Please sign in to comment.