Skip to content

Commit

Permalink
Revert "external: LoadIngestData download all needed data and sort all (
Browse files Browse the repository at this point in the history
pingcap#48871)"

This reverts commit 4309c0f.
  • Loading branch information
lance6716 committed Dec 4, 2023
1 parent 8286fd3 commit b35f796
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 318 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 @@ -30,13 +30,13 @@ go_library(
"//br/pkg/storage",
"//pkg/kv",
"//pkg/metrics",
"//pkg/util",
"//pkg/util/hack",
"//pkg/util/logutil",
"//pkg/util/size",
"@com_github_cockroachdb_pebble//:pebble",
"@com_github_docker_go_units//:go-units",
"@com_github_google_uuid//:uuid",
"@com_github_jfcg_sorty_v2//:sorty",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@org_golang_x_sync//errgroup",
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/lightning/backend/external/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func readMergeIter(s *readTestSuite) {

readBufSize := s.memoryLimit / len(files)
zeroOffsets := make([]uint64, len(files))
iter, err := NewMergeKVIter(ctx, files, zeroOffsets, s.store, readBufSize, false, 0)
iter, err := NewMergeKVIter(ctx, files, zeroOffsets, s.store, readBufSize, false)
intest.AssertNoError(err)

kvCnt := 0
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/lightning/backend/external/byte_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var (
// ConcurrentReaderBufferSizePerConc is the buffer size for concurrent reader per
// concurrency.
ConcurrentReaderBufferSizePerConc = int(4 * size.MB)
// ConcurrentReaderConcurrency is the concurrency for concurrent reader.
ConcurrentReaderConcurrency = 8
)

// byteReader provides structured reading on a byte stream of external storage.
Expand Down

0 comments on commit b35f796

Please sign in to comment.