Skip to content

kvstorage/wag: prepare for WAG truncation#167527

Merged
trunk-io[bot] merged 1 commit into
cockroachdb:masterfrom
iskettaneh:rse_truncate
Apr 6, 2026
Merged

kvstorage/wag: prepare for WAG truncation#167527
trunk-io[bot] merged 1 commit into
cockroachdb:masterfrom
iskettaneh:rse_truncate

Conversation

@iskettaneh

@iskettaneh iskettaneh commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

This commit sets up the premitives for WAG truncations by:

  1. Adding a Delete function for removing WAG nodes by index.
  2. Changing the WAG Iterator.Iter method to return iter.Seq2[uint64, wagpb.Node] pair. This will be useful when we iterate over the WAG and truncate the nodes that have been applied and synced.

References: #167607

Release note: None

@trunk-io

trunk-io Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

😎 Merged successfully - details.

@blathers-crl

blathers-crl Bot commented Apr 4, 2026

Copy link
Copy Markdown

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
Copy Markdown
Member

This change is Reviewable

@iskettaneh
iskettaneh force-pushed the rse_truncate branch 2 times, most recently from 141c29b to 16c01b7 Compare April 4, 2026 14:06
@iskettaneh
iskettaneh requested a review from pav-kv April 6, 2026 13:17
@iskettaneh
iskettaneh marked this pull request as ready for review April 6, 2026 13:17
@iskettaneh
iskettaneh requested a review from a team as a code owner April 6, 2026 13:17

@pav-kv pav-kv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM % adding tests. Please make the PR description well formatted too.

Comment thread pkg/kv/kvserver/kvstorage/wag/store.go
Comment thread pkg/kv/kvserver/kvstorage/wag/store.go
Comment thread pkg/kv/kvserver/kvstorage/wag/store_test.go Outdated
Comment thread pkg/kv/kvserver/kvstorage/wag/store_test.go Outdated
Comment thread pkg/kv/kvserver/kvstorage/wag/store.go
@iskettaneh
iskettaneh force-pushed the rse_truncate branch 2 times, most recently from 3c0333c to d058af5 Compare April 6, 2026 18:55
@iskettaneh

Copy link
Copy Markdown
Contributor Author

/trunk merge

This commit sets up the premitives for WAG truncations by:

1) Adding a `Delete` function for removing WAG nodes by index.
2) Changing the WAG `Iterator.Iter` method to return
 `iter.Seq2[uint64, wagpb.Node]` pair. This will be useful when we
  iterate over the WAG and truncate the nodes that have been applied and
  synced.

Epic: none
Release note: None

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@iskettaneh

Copy link
Copy Markdown
Contributor Author

/trunk merge

@iskettaneh

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io
trunk-io Bot merged commit bbf0219 into cockroachdb:master Apr 6, 2026
24 checks passed
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