Skip to content

Commit 594289b

Browse files
committed
span: add MultiFrontier data structure
This patch adds a new `MultiFrontier` data structure that can be used when we want a frontier that's partitioned into sub-frontiers under the hood based on a custom partitioner function. Release note: None
1 parent d995866 commit 594289b

File tree

3 files changed

+750
-0
lines changed

3 files changed

+750
-0
lines changed

pkg/util/span/BUILD.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ go_library(
66
srcs = [
77
"doc.go",
88
"frontier.go",
9+
"multi_frontier.go",
910
"test_helper.go",
1011
":btreefrontierentry_interval_btree.go", #keep
1112
],
@@ -16,6 +17,7 @@ go_library(
1617
"//pkg/roachpb",
1718
"//pkg/util/buildutil",
1819
"//pkg/util/container/heap",
20+
"//pkg/util/container/heaputil",
1921
"//pkg/util/hlc",
2022
"//pkg/util/interval",
2123
"//pkg/util/syncutil",
@@ -29,6 +31,7 @@ go_test(
2931
srcs = [
3032
"frontier_fuzz_test.go",
3133
"frontier_test.go",
34+
"multi_frontier_test.go",
3235
":btreefrontierentry_interval_btree_test.go", #keep
3336
],
3437
data = glob(["testdata/**"]),
@@ -37,10 +40,12 @@ go_test(
3740
"//pkg/roachpb",
3841
"//pkg/util/container/heap",
3942
"//pkg/util/hlc",
43+
"//pkg/util/iterutil",
4044
"//pkg/util/leaktest",
4145
"//pkg/util/log",
4246
"//pkg/util/randutil",
4347
"//pkg/util/timeutil", #keep
48+
"@com_github_cockroachdb_errors//:errors",
4449
"@com_github_stretchr_testify//require",
4550
],
4651
)

0 commit comments

Comments
 (0)