feat: update item version on put#309
feat: update item version on put#309jason-lynch wants to merge 1 commit intorefactor/component-logger-constantsfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR introduces version updating capabilities to put operations in the storage layer. A new Changes
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@server/internal/storage/interface.go`:
- Around line 137-139: Fix the minor typo in the UpdateVersion method comment:
replace "upate" with "update" in the comment that currently reads "and upate its
item's versions" so the sentence correctly reads "and update its item's
versions"; the comment is adjacent to the UpdateVersion(prevKVs
map[string]*mvccpb.KeyValue) declaration referencing prevKVs and
mvccpb.KeyValue.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 266eee22-9a52-4e02-abf1-30b153218a23
📒 Files selected for processing (6)
server/internal/storage/interface.goserver/internal/storage/put.goserver/internal/storage/put_test.goserver/internal/storage/storagetest/ops.goserver/internal/storage/txn.goserver/internal/storage/txn_test.go
💤 Files with no reviewable changes (1)
- server/internal/storage/storagetest/ops.go
Adds a new feature to `storage.Put` operations to optionally update the value version after the put succeeds. This mechanism works whether the operation is executed by itself or within a transaction. The version is used as a constraint in update operations, so this feature enables us to hold a reference to a value and perform multiple update operations on it without needing to get the value from Etcd in between. We had some unused mock operations in the `storagetest` package, and I opted to remove them in this commit rather than update them for this change.
0eba7c4 to
08cb7d1
Compare
fa785be to
64a9954
Compare
Summary
Adds a new feature to
storage.Putoperations to optionally update the value version after the put succeeds. This mechanism works whether the operation is executed by itself or within a transaction. The version is used as a constraint in update operations, so this feature enables us to hold a reference to a value and perform multiple update operations on it without needing to get the value from Etcd in between.We had some unused mock operations in the
storagetestpackage, and I opted to remove them in this commit rather than update them for this change.Testing
This feature is used by the next PR in this sequence. In this PR, it's only used in the unit/narrow integration tests, so there are no functional changes.