V3MutationService and V3CompatibleTableBinding - qwen3#196
Closed
V3MutationService and V3CompatibleTableBinding - qwen3#196
Conversation
… to eliminate duplicate code Closes #195 ## Plan Created by **opencode (qwen3-coder-480b)** - [ ] V3CompatibleTableBinding: Extract private helper (100% identical HBase mutation construction: Put, Increment, Delete) - [ ] V3CompatibleTableBinding: Extract private helper (identical state decoding logic) - [ ] V3MutationService: Extract helper (label validation + context initialization) - [ ] V3MutationService: Extract helper (CDC message creation + publish) - [ ] V3MutationService: Extract helper and apply to both methods - [ ] Bug fix: Add for to ## Progress <!-- Each agent appends here. Do NOT remove previous entries. --> - [x] Empty commit — **opencode (qwen3-coder-480b)**
… to eliminate duplicate code Closes #195 ## Plan Created by **opencode (qwen3-coder-480b)** - [ ] V3CompatibleTableBinding: Extract `buildHBaseMutations()` private helper (100% identical HBase mutation construction: Put, Increment, Delete) - [ ] V3CompatibleTableBinding: Extract `decodeCurrentState()` private helper (identical state decoding logic) - [ ] V3MutationService: Extract `resolveMutationContext()` helper (label validation + context initialization) - [ ] V3MutationService: Extract `writeCdc()` helper (CDC message creation + publish) - [ ] V3MutationService: Extract `handleMutationError()` helper and apply to both methods - [ ] Bug fix: Add `onErrorResume` for `LockAcquisitionFailedException` to `mutateMultiEdge` ## Progress <!-- Each agent appends here. Do NOT remove previous entries. --> - [x] Empty commit — **opencode (qwen3-coder-480b)**
…g to mutateMultiEdge method This commit fixes issue #195 by adding the missing onErrorResume block to the mutateMultiEdge method in V3MutationService.kt to handle LockAcquisitionFailedException consistently with the mutateEdge method. The error handling ensures that when a lock acquisition fails: 1. Stale locks are cleared using findStaleLockAndClear 2. An appropriate error status (ERROR) is returned instead of propagating the exception This fix ensures both mutateEdge and mutateMultiEdge methods handle lock acquisition failures identically.
Contributor
Author
|
qwen3-coder-480b (OpenCode) fails, while Codex work fine. |
This was referenced Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors V3MutationService and V3CompatibleTableBinding to eliminate duplicate code between mutateEdge and mutateMultiEdge methods. The refactoring extracts common functionality into private helper methods and fixes a bug where mutateMultiEdge was missing LockAcquisitionFailedException error handling.
Closes #195
Plan
Created by opencode (qwen3-coder-480b)
buildHBaseMutations()private helper (100% identical HBase mutation construction: Put, Increment, Delete)decodeCurrentState()private helper (identical state decoding logic)resolveMutationContext()helper (label validation + context initialization)writeCdc()helper (CDC message creation + publish)handleMutationError()helper and apply to both methodsonErrorResumeforLockAcquisitionFailedExceptiontomutateMultiEdgeProgress
Review Comments
The bug reported in issue #195 has been fixed. The refactored code ensures that both
mutateEdgeandmutateMultiEdgemethods now have identical error handling forLockAcquisitionFailedException. ThehandleMutationErrorhelper method properly handles this exception by callingfindStaleLockAndClearand returning an ERROR status.