Optimize performance of key bulk deletion#1287
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request optimizes the performance of cryptographic key bulk deletion operations by implementing batch processing with manual transaction management. The changes enable efficient deletion of large numbers of key items while maintaining proper security filtering and permission evaluation.
Changes:
- Implemented batch processing for key item deletion with configurable batch size
- Added support for multiple parent resource security filtering (TokenInstance and TokenProfile)
- Introduced bulk operations for clearing certificate key associations
- Enhanced test coverage with bulk deletion and permission evaluation tests
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| CryptographicKeyServiceImpl.java | Main implementation of batch deletion logic with manual transaction management and dual-parent security filtering |
| CryptographicKeyService.java | Updated interface to accept SecurityFilter parameter for bulk deletion |
| CryptographicKeyControllerImpl.java | Updated controller to pass SecurityFilter to service method |
| ObjectFilterAspect.java | Extracted populateSecurityFilter as public method for manual security filter population |
| CryptographicKeyItemRepository.java | Added findWithKeyByUuidIn method for efficient key item fetching with associated keys |
| CertificateRepository.java | Added bulk operations for clearing key associations |
| CertificateService.java | Added bulkClearKeyAssociations interface method |
| CertificateServiceImpl.java | Implemented bulk clear operations and optimized single clear operation |
| CryptographicKeyServiceTest.java | Added comprehensive tests for bulk deletion and permission evaluation scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/czertainly/core/service/impl/CryptographicKeyServiceImpl.java
Show resolved
Hide resolved
src/main/java/com/czertainly/core/dao/repository/CryptographicKeyItemRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/com/czertainly/core/service/impl/CryptographicKeyServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/czertainly/core/security/authz/ObjectFilterAspect.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/com/czertainly/core/service/CryptographicKeyServiceTest.java
Show resolved
Hide resolved
src/test/java/com/czertainly/core/service/CryptographicKeyServiceTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@lubomirw Please could you have a look. The build and code analysis fails because of repeated problems with database connectivity. |
36e209e to
16685d0
Compare
|



No description provided.