Skip to content

logical: move TombstoneUpdater into the sqlwriter package#169462

Open
jeffswenson wants to merge 1 commit intocockroachdb:masterfrom
jeffswenson:jeffswenson-move-tombstone-updater
Open

logical: move TombstoneUpdater into the sqlwriter package#169462
jeffswenson wants to merge 1 commit intocockroachdb:masterfrom
jeffswenson:jeffswenson-move-tombstone-updater

Conversation

@jeffswenson
Copy link
Copy Markdown
Collaborator

This allows the tombstone updater to be reused by transactional LDR.

Part of: #169239
Epic: CRDB-60163
Release note: None

@jeffswenson jeffswenson requested a review from a team as a code owner April 30, 2026 19:17
@jeffswenson jeffswenson requested review from aerfrei and removed request for a team April 30, 2026 19:17
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Apr 30, 2026

✨ Submitted to Merge by @jeffswenson. It will be added to the merge queue once all branch protection rules pass and there are no merge conflicts with the target branch. See more details here.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jeffswenson
Copy link
Copy Markdown
Collaborator Author

This is stacked on #169360 and #169249.

@jeffswenson jeffswenson force-pushed the jeffswenson-move-tombstone-updater branch 2 times, most recently from 04ecd07 to 9dfffa6 Compare April 30, 2026 19:53
@jeffswenson
Copy link
Copy Markdown
Collaborator Author

Stress test failed because the sqlwriter package gained a randomized test but was failed to link in the geos package.

Copy link
Copy Markdown
Contributor

@aerfrei aerfrei left a comment

Choose a reason for hiding this comment

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

This faithfully moves the TombstoneUpdater. Effectively, the only thing that doesn't seem to be just a move is the return type of updateTombstone.

Looks good, excited to see the transactional LDR PR.

return err
}
return txn.CommitInBatch(ctx, batch)
})
}()
if err != nil {
if isLwwLoser(err) {
return batchStats{kvWriteTooOld: 1}, nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like we were effectively already returning a boolean here (this only took 2 values). Was there ever a vision for more from this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think the idea here was that batchStats supported stats.add, so you could aggregate stats together, but it never really panned out.

This allows the tombstone updater to be reused by transactional LDR.

Part of: cockroachdb#169239
Epic: CRDB-60163
Release note: None
@jeffswenson jeffswenson force-pushed the jeffswenson-move-tombstone-updater branch from 9dfffa6 to 1075551 Compare May 9, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants