Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: bump some dependencies for release-6.5 hot patch #57272

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
66bd453
*: bump some dependencies
bb7133 Nov 11, 2024
11c1386
update
hawkingrei Nov 11, 2024
d4cb93b
util: use runtime.Version() to get Go version (#53619)
dveeden May 29, 2024
e9d607d
upgrade go version
bb7133 Nov 12, 2024
d35542e
set golang 1.23.3
hawkingrei Nov 12, 2024
7314ef1
update dependencies
hawkingrei Nov 14, 2024
b528ec3
update dependencies
hawkingrei Nov 14, 2024
2b60522
update dependencies
hawkingrei Nov 14, 2024
f9d3d92
update dependencies
hawkingrei Nov 14, 2024
1792e39
update dependencies
hawkingrei Nov 14, 2024
646ec95
update dependencies
hawkingrei Nov 14, 2024
fd84a1c
update dependencies
hawkingrei Nov 14, 2024
1f16075
update dependencies
hawkingrei Nov 14, 2024
1b8c93b
update dependencies
hawkingrei Nov 14, 2024
9984489
update dependencies
hawkingrei Nov 14, 2024
42c2f40
update dependencies
hawkingrei Nov 14, 2024
1244eba
update dependencies
hawkingrei Nov 14, 2024
30ce4ae
update dependencies
hawkingrei Nov 14, 2024
a04ebcd
update dependencies
hawkingrei Nov 14, 2024
b670dea
update dependencies
hawkingrei Nov 14, 2024
f9ba6c0
update dependencies
hawkingrei Nov 14, 2024
a7f947a
update dependencies
hawkingrei Nov 14, 2024
43ecde1
update dependencies
hawkingrei Nov 14, 2024
a24dcb9
update dependencies
hawkingrei Nov 14, 2024
9fde67c
update dependencies
hawkingrei Nov 14, 2024
608b7be
update dependencies
hawkingrei Nov 14, 2024
474a7b5
update dependencies
hawkingrei Nov 14, 2024
0231378
update dependencies
hawkingrei Nov 14, 2024
a3d3735
update dependencies
hawkingrei Nov 14, 2024
2d4a655
update dependencies
hawkingrei Nov 14, 2024
b3171b1
update dependencies
hawkingrei Nov 14, 2024
b04a978
update dependencies
hawkingrei Nov 14, 2024
3150200
update dependencies
hawkingrei Nov 14, 2024
11abda5
update dependencies
hawkingrei Nov 14, 2024
f42f2a5
update dependencies
hawkingrei Nov 14, 2024
691ef3d
update dependencies
hawkingrei Nov 14, 2024
a745036
update dependencies
hawkingrei Nov 14, 2024
a97377e
update dependencies
hawkingrei Nov 14, 2024
4285ad3
update dependencies
hawkingrei Nov 14, 2024
5ed7a63
update dependencies
hawkingrei Nov 14, 2024
d03dfaf
update dependencies
hawkingrei Nov 14, 2024
4acff51
update dependencies
hawkingrei Nov 14, 2024
bb5b09f
update dependencies
hawkingrei Nov 14, 2024
bda779a
update dependencies
hawkingrei Nov 14, 2024
3c14252
update dependencies
hawkingrei Nov 14, 2024
5474b87
update dependencies
hawkingrei Nov 14, 2024
b919512
update dependencies
hawkingrei Nov 14, 2024
c17ac12
update dependencies
hawkingrei Nov 14, 2024
02facc9
update dependencies
hawkingrei Nov 14, 2024
936e3fa
update dependencies
hawkingrei Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4,884 changes: 3,696 additions & 1,188 deletions DEPS.bzl

Large diffs are not rendered by default.

125 changes: 105 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,25 +1,70 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Required by toolchains_protoc.
http_archive(
name = "platforms",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
)

http_archive(
name = "bazel_features",
sha256 = "ba1282c1aa1d1fffdcf994ab32131d7c7551a9bc960fbf05f42d55a1b930cbfb",
strip_prefix = "bazel_features-1.15.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.15.0/bazel_features-v1.15.0.tar.gz",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

http_archive(
name = "bazel_skylib",
sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/rules/bazel-skylib-1.4.2.tar.gz",
"http://ats.apps.svc/gomod/rules/bazel-skylib-1.4.2.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
],
)

load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check(minimum_bazel_version = "6.0.0")

http_archive(
name = "io_bazel_rules_go",
sha256 = "d6ab6b57e48c09523e93050f13698f708428cfd5e619252e369d377af6597707",
sha256 = "f4a9314518ca6acfa16cc4ab43b0b8ce1e4ea64b81c38d8a3772883f153346b8",
urls = [
"http://bazel-cache.pingcap.net:8080/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip",
"http://ats.apps.svc/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip",
"http://bazel-cache.pingcap.net:8080/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
"http://ats.apps.svc/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
],
)

http_archive(
name = "bazel_gazelle",
sha256 = "b7387f72efb59f876e4daae42f1d3912d0d45563eac7cb23d1de0b094ab588cf",
sha256 = "8ad77552825b078a10ad960bec6ef77d2ff8ec70faef2fd038db713f410f5d87",
urls = [
"http://bazel-cache.pingcap.net:8080/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz",
"http://ats.apps.svc/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz",
],
)

http_archive(
name = "rules_cc",
urls = [
"http://bazel-cache.pingcap.net:8080/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
"http://ats.apps.svc/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
"http://bazel-cache.pingcap.net:8080/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz",
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz",
"http://ats.apps.svc/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz",
],
sha256 = "3d9e271e2876ba42e114c9b9bc51454e379cbf0ec9ef9d40e2ae4cec61a31b40",
strip_prefix = "rules_cc-0.0.6",
)

load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies")
Expand All @@ -34,12 +79,13 @@ go_rules_dependencies()
go_download_sdk(
name = "go_sdk",
urls = [
"https://cache.hawkingrei.com/golang/{}",
"http://ats.apps.svc/golang/{}",
"http://bazel-cache.pingcap.net:8080/golang/{}",
"https://mirrors.aliyun.com/golang/{}",
"https://dl.google.com/go/{}",
],
version = "1.19.12",
version = "1.23.3",
)

go_register_toolchains(
Expand All @@ -54,8 +100,9 @@ http_archive(
strip_prefix = "protobuf-3.15.5",
# latest, as of 2021-03-08
urls = [
"https://github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz",
"http://bazel-cache.pingcap.net:8080/gomod/rules/protobuf-3.15.5.tar.gz ",
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz",
],
)

Expand All @@ -65,20 +112,58 @@ protobuf_deps()

http_archive(
name = "remote_java_tools",
sha256 = "5cd59ea6bf938a1efc1e11ea562d37b39c82f76781211b7cd941a2346ea8484d",
sha256 = "f58a358ca694a41416a9b6a92b852935ad301d8882e5d22f4f11134f035317d5",
urls = [
"http://ats.apps.svc/bazel_java_tools/releases/java/v11.9/java_tools-v11.9.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.9/java_tools-v11.9.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.9/java_tools-v11.9.zip",
"http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools-v12.6.zip",
"http://ats.apps.svc/gomod/rules/java_tools-v12.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools-v12.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools-v12.6.zip",
],
)

http_archive(
name = "remote_java_tools_linux",
sha256 = "512582cac5b7ea7974a77b0da4581b21f546c9478f206eedf54687eeac035989",
sha256 = "64294e91fe940c77e6d35818b4c3a1f07d78e33add01e330188d907032687066",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools_linux-v12.6.zip",
"http://ats.apps.svc/gomod/rules/java_tools_linux-v12.6.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools_linux-v12.6.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools_linux-v12.6.zip",
],
)

http_archive(
name = "rules_proto",
sha256 = "303e86e722a520f6f326a50b41cfc16b98fe6d1955ce46642a5b7a67c11c0f5d",
strip_prefix = "rules_proto-6.0.0",
urls = [
"https://github.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz",
],
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()

http_archive(
name = "rules_java",
sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3",
strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
urls = [
"http://ats.apps.svc/bazel_java_tools/releases/java/v11.9/java_tools_linux-v11.9.zip",
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.9/java_tools_linux-v11.9.zip",
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.9/java_tools_linux-v11.9.zip",
"http://bazel-cache.pingcap.net:8080/gomod/rules/rules_java/rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz",
"http://ats.apps.svc/bazelbuild/gomod/rules/rules_java/rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz",
"https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz",
],
)

http_archive(
name = "toolchains_protoc",
sha256 = "117af61ee2f1b9b014dcac7c9146f374875551abb8a30e51d1b3c5946d25b142",
strip_prefix = "toolchains_protoc-0.3.0",
url = "https://github.com/aspect-build/toolchains_protoc/releases/download/v0.3.0/toolchains_protoc-v0.3.0.tar.gz",
)
2 changes: 1 addition & 1 deletion bindinfo/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/backup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("github.com/pingcap/goleveldb/leveldb.(*DB).mpoolDrain"),
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/checksum/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/conn/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
Expand Down
10 changes: 7 additions & 3 deletions br/pkg/lightning/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package backend

import (
"cmp"
"context"
"fmt"
"time"
Expand Down Expand Up @@ -303,11 +304,14 @@ func (be Backend) CheckDiskQuota(quota int64) (
totalMemSize int64,
) {
sizes := be.abstract.EngineFileSizes()
slices.SortFunc(sizes, func(i, j EngineFileSize) bool {
slices.SortFunc(sizes, func(i, j EngineFileSize) int {
if i.IsImporting != j.IsImporting {
return i.IsImporting
if i.IsImporting {
return -1
}
return 1
}
return i.DiskSize+i.MemSize < j.DiskSize+j.MemSize
return cmp.Compare(i.DiskSize+i.MemSize, j.DiskSize+j.MemSize)
})
for _, size := range sizes {
totalDiskSize += size.DiskSize
Expand Down
5 changes: 3 additions & 2 deletions br/pkg/lightning/backend/kv/sql2kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package kv

import (
"cmp"
"context"
"fmt"
"math"
Expand Down Expand Up @@ -186,8 +187,8 @@
}

// order the result by column offset so they match the evaluation order.
slices.SortFunc(genCols, func(i, j genCol) bool {
return cols[i.index].Offset < cols[j.index].Offset
slices.SortFunc(genCols, func(i, j genCol) int {
return cmp.Compare(cols[i.index].Offset, cols[j.index].Offset)

Check warning on line 191 in br/pkg/lightning/backend/kv/sql2kv.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/lightning/backend/kv/sql2kv.go#L190-L191

Added lines #L190 - L191 were not covered by tests
})
return genCols, nil
}
Expand Down
12 changes: 6 additions & 6 deletions br/pkg/lightning/backend/local/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@
if len(metas) == 0 {
return nil
}
slices.SortFunc(metas, func(i, j *sstMeta) bool {
return bytes.Compare(i.minKey, j.minKey) < 0
slices.SortFunc(metas, func(i, j *sstMeta) int {
return bytes.Compare(i.minKey, j.minKey)

Check warning on line 756 in br/pkg/lightning/backend/local/engine.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/lightning/backend/local/engine.go#L756

Added line #L756 was not covered by tests
})

metaLevels := make([][]*sstMeta, 0)
Expand Down Expand Up @@ -914,8 +914,8 @@
return ranges
}

slices.SortFunc(ranges, func(i, j Range) bool {
return bytes.Compare(i.start, j.start) < 0
slices.SortFunc(ranges, func(i, j Range) int {
return bytes.Compare(i.start, j.start)
})

curEnd := ranges[0].end
Expand Down Expand Up @@ -1181,8 +1181,8 @@
return errors.Trace(err)
}
if !w.isWriteBatchSorted {
slices.SortFunc(w.writeBatch[:w.batchCount], func(i, j common.KvPair) bool {
return bytes.Compare(i.Key, j.Key) < 0
slices.SortFunc(w.writeBatch[:w.batchCount], func(i, j common.KvPair) int {
return bytes.Compare(i.Key, j.Key)
})
w.isWriteBatchSorted = true
}
Expand Down
12 changes: 6 additions & 6 deletions br/pkg/lightning/backend/local/localhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ func (local *local) SplitAndScatterRegionByRanges(
var err1 error
region := sp.region
keys := sp.keys
slices.SortFunc(keys, func(i, j []byte) bool {
return bytes.Compare(i, j) < 0
slices.SortFunc(keys, func(i, j []byte) int {
return bytes.Compare(i, j)
})
splitRegion := region
startIdx := 0
Expand Down Expand Up @@ -247,8 +247,8 @@ func (local *local) SplitAndScatterRegionByRanges(
log.FromContext(ctx).Info("batch split region", zap.Uint64("region_id", splitRegion.Region.Id),
zap.Int("keys", endIdx-startIdx), zap.Binary("firstKey", keys[startIdx]),
zap.Binary("end", keys[endIdx-1]))
slices.SortFunc(newRegions, func(i, j *split.RegionInfo) bool {
return bytes.Compare(i.Region.StartKey, j.Region.StartKey) < 0
slices.SortFunc(newRegions, func(i, j *split.RegionInfo) int {
return bytes.Compare(i.Region.StartKey, j.Region.StartKey)
})
syncLock.Lock()
scatterRegions = append(scatterRegions, newRegions...)
Expand Down Expand Up @@ -293,8 +293,8 @@ func (local *local) SplitAndScatterRegionByRanges(
if len(retryKeys) == 0 {
break
}
slices.SortFunc(retryKeys, func(i, j []byte) bool {
return bytes.Compare(i, j) < 0
slices.SortFunc(retryKeys, func(i, j []byte) int {
return bytes.Compare(i, j)
})
minKey = codec.EncodeBytes([]byte{}, retryKeys[0])
maxKey = codec.EncodeBytes([]byte{}, nextKey(retryKeys[len(retryKeys)-1]))
Expand Down
12 changes: 10 additions & 2 deletions br/pkg/lightning/checkpoints/checkpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package checkpoints

import (
"cmp"
"context"
"database/sql"
"encoding/json"
Expand Down Expand Up @@ -229,6 +230,13 @@
return fmt.Sprintf("%s:%d", key.Path, key.Offset)
}

func (key *ChunkCheckpointKey) compare(other *ChunkCheckpointKey) int {
if c := cmp.Compare(key.Path, other.Path); c != 0 {
return c
}
return cmp.Compare(key.Offset, other.Offset)

Check warning on line 237 in br/pkg/lightning/checkpoints/checkpoints.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/lightning/checkpoints/checkpoints.go#L233-L237

Added lines #L233 - L237 were not covered by tests
}

func (key *ChunkCheckpointKey) less(other *ChunkCheckpointKey) bool {
switch {
case key.Path < other.Path:
Expand Down Expand Up @@ -1257,8 +1265,8 @@
})
}

slices.SortFunc(engine.Chunks, func(i, j *ChunkCheckpoint) bool {
return i.Key.less(&j.Key)
slices.SortFunc(engine.Chunks, func(i, j *ChunkCheckpoint) int {
return i.Key.compare(&j.Key)

Check warning on line 1269 in br/pkg/lightning/checkpoints/checkpoints.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/lightning/checkpoints/checkpoints.go#L1269

Added line #L1269 was not covered by tests
})

cp.Engines[engineID] = engine
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/lightning/checkpoints/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/lightning/common/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
4 changes: 2 additions & 2 deletions br/pkg/lightning/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,13 +690,13 @@ func TestTomlPostRestore(t *testing.T) {
[post-restore]
checksum = "req"
`))
require.EqualError(t, err, "invalid op level 'req', please choose valid option between ['off', 'optional', 'required']")
require.EqualError(t, err, "toml: line 3 (last key \"post-restore.checksum\"): invalid op level 'req', please choose valid option between ['off', 'optional', 'required']")

err = cfg.LoadFromTOML([]byte(`
[post-restore]
analyze = 123
`))
require.EqualError(t, err, "invalid op level '123', please choose valid option between ['off', 'optional', 'required']")
require.EqualError(t, err, "toml: line 3 (last key \"post-restore.analyze\"): invalid op level '123', please choose valid option between ['off', 'optional', 'required']")

kvMap := map[string]config.PostOpLevel{
`"off"`: config.OpLevelOff,
Expand Down
Loading
Loading