Skip to content

jobfrontier: add GetResolvedSpans/GetAllResolvedSpans #153074

@andyyang890

Description

@andyyang890

The following convenience methods would be nice:

  • GetResolvedSpans(ctx context.Context, txn isql.Txn, jobID jobspb.JobID, name string) (jobspb.ResolvedSpans, bool, error): like Get, except it returns the actual resolved spans so that callers have the flexibility for whether they want to immediately put them in a frontier

  • GetAllResolvedSpans(ctx context.Context, txn isql.Txn, jobID jobspb.JobID) (jobspb.ResolvedSpans, bool, error): like GetResolvedSpans, except it returns the resolved spans for all frontiers for a job, which is useful for jobs that persist multiple frontiers (e.g. CDC per-table frontiers)

    • (alternative signature) GetAllResolvedSpans(ctx context.Context, txn isql.Txn, jobID jobspb.JobID) (map[string]jobspb.ResolvedSpans, bool, error): returns a map from name to resolved spans for a job

Jira issue: CRDB-54177

Metadata

Metadata

Assignees

Labels

A-cdcChange Data CaptureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-cdctarget-release-25.4.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions