Skip to content

Commit

Permalink
Merge #137554
Browse files Browse the repository at this point in the history
137554: changefeedccl: move resolved span frontiers into separate package r=asg0451 a=andyyang890

This patch renames `schemaChangeFrontier` to `resolvedSpanFrontier`
to reflect that not all resolved span boundaries correspond to schema
changes (e.g. initial-scan-only, end time reached). Its private fields
are also now properly encapsulated and new derived struct types for each
processor type have been created to handle the processor-specific
boundary handling logic. The field and method used for tracking whether
a changefeed is considered idle has been extracted from the frontier
struct because it is not related to span progress or boundaries.
Finally, the frontier data structures have been moved to a separate
`resolvedspan` package to provide better abstraction of its internal
implementation.

Epic: None

Release note: None

Co-authored-by: Andy Yang <[email protected]>
  • Loading branch information
craig[bot] and andyyang890 committed Jan 2, 2025
2 parents bb4bfae + 870a7fc commit c47ab2c
Show file tree
Hide file tree
Showing 8 changed files with 718 additions and 340 deletions.
3 changes: 3 additions & 0 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ALL_TESTS = [
"//pkg/ccl/changefeedccl/checkpoint:checkpoint_test",
"//pkg/ccl/changefeedccl/kvevent:kvevent_test",
"//pkg/ccl/changefeedccl/kvfeed:kvfeed_test",
"//pkg/ccl/changefeedccl/resolvedspan:resolvedspan_test",
"//pkg/ccl/changefeedccl/schemafeed:schemafeed_test",
"//pkg/ccl/changefeedccl:changefeedccl_test",
"//pkg/ccl/cliccl:cliccl_test",
Expand Down Expand Up @@ -880,6 +881,8 @@ GO_TARGETS = [
"//pkg/ccl/changefeedccl/kvfeed:kvfeed",
"//pkg/ccl/changefeedccl/kvfeed:kvfeed_test",
"//pkg/ccl/changefeedccl/mocks:mocks",
"//pkg/ccl/changefeedccl/resolvedspan:resolvedspan",
"//pkg/ccl/changefeedccl/resolvedspan:resolvedspan_test",
"//pkg/ccl/changefeedccl/schemafeed/schematestutils:schematestutils",
"//pkg/ccl/changefeedccl/schemafeed:schemafeed",
"//pkg/ccl/changefeedccl/schemafeed:schemafeed_test",
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/changefeedccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ go_library(
"parquet.go",
"parquet_sink_cloudstorage.go",
"protected_timestamps.go",
"resolved_span_frontier.go",
"retry.go",
"scheduled_changefeed.go",
"schema_registry.go",
Expand Down Expand Up @@ -61,6 +60,7 @@ go_library(
"//pkg/ccl/changefeedccl/checkpoint",
"//pkg/ccl/changefeedccl/kvevent",
"//pkg/ccl/changefeedccl/kvfeed",
"//pkg/ccl/changefeedccl/resolvedspan",
"//pkg/ccl/changefeedccl/schemafeed",
"//pkg/ccl/changefeedccl/timers",
"//pkg/ccl/kvccl/kvfollowerreadsccl",
Expand Down
Loading

0 comments on commit c47ab2c

Please sign in to comment.