unitycatalog / unitycatalog/unitycatalog
Improve transactionality of permission changes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 672
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 30
Description
Is your feature request related to a problem? Please describe.
The first pass at permissions/access control does not always do all its work within a transaction along with other work being done as a request.
Describe the solution you would like
There are three areas this can be improved
Creating and removing access in PermissionService.updateAuthorizatio() - currently each change that is submitted it committed separately. This can lead to partially completed work if an error occurs part way through. All the changes should be done in a transaction so they either all succeed or fail.
Entity creation in each of the entity services - currently the initial permissions are added after the entity is created (via the repository). This can lead to inaccessible entities If an error occurs adding the initial permissions.
Entity deletion in each of the entity services - currently the assigned permissions are removed after the entity has been deleted. This can lead to turds if a problem occurs during permission removal.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PermissionService.updateAuthorizatio() and trace the entity services that create and delete entities. Review where permission changes and repository operations commit, then verify that permission updates, entity creation, and entity deletion complete atomically so failures do not leave partial work or orphaned permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authorization, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100