Skip to content

Commit

Permalink
fix allocation size
Browse files Browse the repository at this point in the history
Signed-off-by: Jianjun Liao <[email protected]>
  • Loading branch information
Leavrth committed Aug 22, 2024
1 parent 9653af9 commit 0092ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion br/pkg/rtree/rtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func (rangeTree *ProgressRangeTree) FindContained(startKey, endKey []byte) (*Pro
}

func (rangeTree *ProgressRangeTree) GetIncompleteRanges() []Range {
incompleteRanges := make([]Range, 0, 8*rangeTree.incompleteItemCount)
incompleteRanges := make([]Range, 0, 2*(rangeTree.Len()+1))
rangeTree.Ascend(func(item *ProgressRange) bool {
// NOTE: maybe there is a late response whose range overlaps with an existing item, which
// may cause the complete range tree to become incomplete. Therefore, `item.Complete` is
Expand Down

0 comments on commit 0092ecb

Please sign in to comment.