Skip to content

storage: add inline put and del for raft log writes#169771

Draft
pav-kv wants to merge 2 commits intocockroachdb:masterfrom
pav-kv:mvcc-put-inlined
Draft

storage: add inline put and del for raft log writes#169771
pav-kv wants to merge 2 commits intocockroachdb:masterfrom
pav-kv:mvcc-put-inlined

Conversation

@pav-kv
Copy link
Copy Markdown
Collaborator

@pav-kv pav-kv commented May 5, 2026

Add MVCCBlindPutInline (and MVCCBlindPutInlineProto), a distilled version of MVCCBlindPut for non-transactional inline blind writes. This strips away all unused machinery from the ~580-line mvccPutInternal code path: iterators, lock table scanning, transactions, versioned keys, conflict detection, lock acquisition, valueFn, and logical ops.

Wire up raft log appends, truncated state writes, and hard state writes to use the new function.

Epic: none
Release note: None

Add MVCCBlindPutInline (and MVCCBlindPutInlineProto), a distilled version
of MVCCBlindPut for non-transactional inline blind writes. This strips
away all unused machinery from the ~580-line mvccPutInternal code path:
iterators, lock table scanning, transactions, versioned keys, conflict
detection, lock acquisition, valueFn, and logical ops.

Wire up raft log appends, truncated state writes, and hard state writes
to use the new function.

Epic: none
Release note: None

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pav-kv pav-kv added the do-not-merge bors won't merge a PR with this label. label May 5, 2026
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 5, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented May 5, 2026

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

Add MVCCDeleteInline, a distilled version of MVCCDelete for inline
(unversioned) values. It reads the existing value size for stats
accounting, then issues ClearUnversioned — bypassing the full
mvccPutInternal path with its lock table scanning, transaction handling,
and versioned value logic.

Wire up the raft log append path (which deletes overwritten log entries)
to use the new function.

Epic: none
Release note: None

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pav-kv pav-kv changed the title storage: add MVCCBlindPutInline for raft log writes storage: add inline put and del for raft log writes May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge bors won't merge a PR with this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants