Skip to content

Commit

Permalink
Merge #107175
Browse files Browse the repository at this point in the history
107175: rangefeed: scheduler for rangefeed usage r=erikgrinaker a=aliher1911

Scheduler adds a work scheduler that could enqueue events to be processed by callbacks using a fixed goroutine pool. By using scheduler, components can eliminate excessive handover of data between goroutines in per-range cases reducing go scheduler load and thus reducing CPU and responsiveness.

Release note: None

Epic: https://cockroachlabs.atlassian.net/browse/CRDB-26372

Co-authored-by: Oleg Afanasyev <[email protected]>
  • Loading branch information
craig[bot] and aliher1911 committed Aug 24, 2023
2 parents 816c684 + 0421624 commit 3020929
Show file tree
Hide file tree
Showing 3 changed files with 982 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/kv/kvserver/rangefeed/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go_library(
"processor.go",
"registry.go",
"resolved_timestamp.go",
"scheduler.go",
"task.go",
],
importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/rangefeed",
Expand All @@ -24,6 +25,7 @@ go_library(
"//pkg/storage/enginepb",
"//pkg/util/admission",
"//pkg/util/bufalloc",
"//pkg/util/buildutil",
"//pkg/util/envutil",
"//pkg/util/future",
"//pkg/util/hlc",
Expand Down Expand Up @@ -52,6 +54,7 @@ go_test(
"processor_test.go",
"registry_test.go",
"resolved_timestamp_test.go",
"scheduler_test.go",
"task_test.go",
],
args = ["-test.timeout=895s"],
Expand Down Expand Up @@ -85,5 +88,6 @@ go_test(
"@com_github_cockroachdb_pebble//vfs",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_golang_x_exp//slices",
],
)
Loading

0 comments on commit 3020929

Please sign in to comment.