Scott Kidder 6 år sedan
förälder
incheckning
ae8e47f3da
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      balance_strategy.go

+ 3 - 2
balance_strategy.go

@@ -1038,12 +1038,13 @@ nextCand:
 }
 }
 
 
 type consumerGroupMember struct {
 type consumerGroupMember struct {
-	index       int // the index of the item in the heap
+	index       int // the index of the consumer group member on the heap
 	id          string
 	id          string
 	assignments []topicPartitionAssignment
 	assignments []topicPartitionAssignment
 }
 }
 
 
-// A assignmentPriorityQueue implements heap.Interface and holds Items.
+// assignmentPriorityQueue is a priority-queue of consumer group members that is sorted
+// in descending order (most assignments to least assignments).
 type assignmentPriorityQueue []*consumerGroupMember
 type assignmentPriorityQueue []*consumerGroupMember
 
 
 func (pq assignmentPriorityQueue) Len() int { return len(pq) }
 func (pq assignmentPriorityQueue) Len() int { return len(pq) }