Skip to content

Conversation

andyyang890
Copy link
Collaborator

span: redefine Frontier in terms of ReadOnlyFrontier

The ReadOnlyFrontier interface is a strict subset of Frontier
and to reduce duplicate code, this commit redefines Frontier
in terms of ReadOnlyFrontier.

Release note: None


jobfrontier: change Get to accept read-only frontier

This patch changes Get to accept a read-only frontier to prevent
any accidental modification of the passed-in frontier.

Release note: None


Epic: None

Copy link

blathers-crl bot commented Sep 6, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

The `ReadOnlyFrontier` interface is a strict subset of `Frontier`
and to reduce duplicate code, this commit redefines `Frontier`
in terms of `ReadOnlyFrontier`.

Release note: None
This patch changes `Get` to accept a read-only frontier to prevent
any accidental modification of the passed-in frontier.

Release note: None
@andyyang890 andyyang890 force-pushed the 20250905-read-only-frontier branch from df58294 to a78dff7 Compare September 6, 2025 00:33
txn isql.Txn,
jobID jobspb.JobID,
name string,
frontier span.ReadOnlyFrontier,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional motivation for this change is that when we're accessing the sub-frontiers in a span.MultiFrontier, we only have a span.ReadOnlyFrontier and we'd like to be able to store the sub-frontiers with this function

@andyyang890 andyyang890 marked this pull request as ready for review September 6, 2025 01:44
@andyyang890 andyyang890 requested review from a team as code owners September 6, 2025 01:44
@andyyang890 andyyang890 requested review from jeffswenson, dt, asg0451 and msbutler and removed request for a team September 6, 2025 01:44
@andyyang890
Copy link
Collaborator Author

TFTR!

bors r=msbutler

@craig
Copy link
Contributor

craig bot commented Sep 8, 2025

@craig craig bot merged commit dbdfb73 into cockroachdb:master Sep 8, 2025
23 checks passed
@andyyang890 andyyang890 deleted the 20250905-read-only-frontier branch September 8, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants