瀏覽代碼

Fix comments

Scott Kidder 6 年之前
父節點
當前提交
ae8e47f3da
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      balance_strategy.go

+ 3 - 2
balance_strategy.go

@@ -1038,12 +1038,13 @@ nextCand:
 }
 
 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
 	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
 
 func (pq assignmentPriorityQueue) Len() int { return len(pq) }