Skip to content

Commit

Permalink
fix more
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Dec 4, 2023
1 parent 6938bef commit 1135139
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion br/pkg/lightning/backend/external/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ go_test(
],
embed = [":external"],
flaky = True,
shard_count = 47,
shard_count = 48,
deps = [
"//br/pkg/lightning/backend/kv",
"//br/pkg/lightning/common",
Expand Down
3 changes: 2 additions & 1 deletion br/pkg/lightning/backend/external/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/pingcap/tidb/br/pkg/membuf"
"github.com/pingcap/tidb/br/pkg/storage"
"github.com/pingcap/tidb/pkg/util/logutil"
"github.com/pingcap/tidb/pkg/util/size"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
)
Expand Down Expand Up @@ -196,7 +197,7 @@ func newMergeIter[
if sampleKeySize == 0 || sampleKeySize/sampleKeyCnt == 0 {
i.checkHotspotPeriod = 10000
} else {
sizeThreshold := 32 * 1024 * 1024
sizeThreshold := int(32 * size.MB)
i.checkHotspotPeriod = max(1000, sizeThreshold/(sampleKeySize/sampleKeyCnt))
}
heap.Init(&i.h)
Expand Down

0 comments on commit 1135139

Please sign in to comment.