Skip to content

Commit

Permalink
infoschema: replace the btree library for v2 implementation (#58466)
Browse files Browse the repository at this point in the history
close #58363
  • Loading branch information
tiancaiamao authored Dec 24, 2024
1 parent 457dcc6 commit e403d8f
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 103 deletions.
13 changes: 0 additions & 13 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6916,19 +6916,6 @@ def go_deps():
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tiancaiamao/gp/com_github_tiancaiamao_gp-v0.0.0-20221230034425-4025bc8a4d4a.zip",
],
)
go_repository(
name = "com_github_tidwall_btree",
build_file_proto_mode = "disable_global",
importpath = "github.com/tidwall/btree",
sha256 = "4a6619eb936c836841702933a9d66f27abe83b7ffb541de44d12db4aa3a809d5",
strip_prefix = "github.com/tidwall/[email protected]",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tidwall/btree/com_github_tidwall_btree-v1.7.0.zip",
"http://ats.apps.svc/gomod/github.com/tidwall/btree/com_github_tidwall_btree-v1.7.0.zip",
"https://cache.hawkingrei.com/gomod/github.com/tidwall/btree/com_github_tidwall_btree-v1.7.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tidwall/btree/com_github_tidwall_btree-v1.7.0.zip",
],
)
go_repository(
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ require (
github.com/stretchr/testify v1.10.0
github.com/tdakkota/asciicheck v0.2.0
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tidwall/btree v1.7.0
github.com/tikv/client-go/v2 v2.0.8-0.20241223070848-fd950fcf9fcc
github.com/tikv/pd/client v0.0.0-20241220053006-461b86adc78d
github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,6 @@ github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 h1:mbAskLJ0oJf
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a h1:J/YdBZ46WKpXsxsW93SG+q0F8KI+yFrcIDT4c/RNoc4=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a/go.mod h1:h4xBhSNtOeEosLJ4P7JyKXX7Cabg7AVkWCK5gV2vOrM=
github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/tikv/client-go/v2 v2.0.8-0.20241223070848-fd950fcf9fcc h1:VLq5SWaQ6xbdI8B0tBeWm44ZPuznaRjRcC9YRVaffKw=
github.com/tikv/client-go/v2 v2.0.8-0.20241223070848-fd950fcf9fcc/go.mod h1:H+EqIN/3fOXhVgzZT91Bk1XF1kfvlBZCYcpMIC8FNbg=
github.com/tikv/pd/client v0.0.0-20241220053006-461b86adc78d h1:V/LfOrlfS4Ct+AHvjbxVXAZZgqjcpuc53m0wxk0xYF4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/infoschema/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ go_library(
"//pkg/util/size",
"//pkg/util/stmtsummary",
"//pkg/util/tracing",
"@com_github_google_btree//:btree",
"@com_github_ngaut_pools//:pools",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_kvproto//pkg/diagnosticspb",
"@com_github_pingcap_kvproto//pkg/metapb",
"@com_github_pingcap_log//:log",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_tidwall_btree//:btree",
"@com_github_tikv_client_go_v2//tikv",
"@com_github_tikv_pd_client//http",
"@org_golang_google_grpc//:grpc",
Expand Down
4 changes: 2 additions & 2 deletions pkg/infoschema/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,8 @@ func (b *Builder) createSchemaTablesForDB(di *model.DBInfo, tableFromMeta tableF
tableID: id,
schemaVersion: schemaVersion,
}
b.infoData.byID.Set(&item)
b.infoData.byName.Set(&item)
btreeSet(&b.infoData.byID, &item)
btreeSet(&b.infoData.byName, &item)
}
}
b.addDB(schemaVersion, di, schTbls)
Expand Down
Loading

0 comments on commit e403d8f

Please sign in to comment.