feat: add user locking to isolation reservation table#185
Closed
porcellus wants to merge 11 commits into
Closed
Conversation
- Add LockedUser interface for compile-time lock enforcement - Add LockedUserPair DTO for linking operations - Add UserLockingStorage interface with lockUser/lockUsers methods - Add UserNotFoundForLockingException for missing users - Add AccountInfoStorage skeleton interface for future ISO tickets Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tInfoStorage Add method signature that requires LockedUser parameters to ensure proper locking has been acquired before linking operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…e interface Add the LockedUser-enforced version of updateAccountInfo_Transaction method to the AccountInfoStorage interface. This method requires a LockedUser parameter to ensure proper row-level locking has been acquired before updating account info. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…foStorage Add interface method that requires LockedUser parameter to ensure proper locking when a user becomes a primary user, preventing race conditions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tionForPrimaryUserForUnlinking Add removeAccountInfoReservationForPrimaryUserForUnlinking_Transaction method to AccountInfoStorage interface that requires LockedUser parameters for both recipeUser and primaryUser. This ensures proper row-level locking before removing account info reservations during unlink operations, preventing race conditions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ignature - Remove redundant AppIdentifier parameter (TenantIdentifier extends AppIdentifier) - Simplify signature to (TenantIdentifier, TransactionConnection, LockedUser) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…foStorage with LockedUser Move addTenantIdToPrimaryUser_Transaction from AuthRecipeSQLStorage to AccountInfoStorage and change the parameter from String userId to LockedUser primaryUser. This ensures proper row-level locking has been acquired before adding account info reservations for a tenant association, preventing race conditions during concurrent tenant association and linking operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The recipe ID is now fetched from app_id_to_user_id during lock acquisition and stored in LockedUser. This ensures the recipe ID is always available even when a user has been removed from all tenants (when all_auth_recipe_users has no row for them). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tamassoltesz
approved these changes
Feb 16, 2026
…' into feat/isolation-reservation-table-locking
…tionForPrimaryUserForUnlinking_Transaction The primary user ID can be derived from recipeUser.getPrimaryUserId() since lockUser() already acquires locks on both the recipe user and their primary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by #199, which consolidates feat/isolation-reservation-table, feat/isolation-reservation-table-locking, feat/isolation-reservation-table-migration, and refactor/performance_improvements into a single PR targeting master. Closing in favor of that PR — please re-route review there. |
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 of change
(A few sentences about this PR)
Related issues
Checklist for important updates
build.gradlegit tag) in the formatvX.Y.Z, and then find thelatest branch (
git branch --all) whoseX.Yis greater than the latest released tag.Remaining TODOs for this PR