ACC-2624 Proposal of deletion policy / document lifecycle#249
Draft
thijslemmens wants to merge 9 commits intomainfrom
Draft
ACC-2624 Proposal of deletion policy / document lifecycle#249thijslemmens wants to merge 9 commits intomainfrom
thijslemmens wants to merge 9 commits intomainfrom
Conversation
Proposes a reference-counted content lifecycle system that tracks when content objects can be safely deleted from the ContentStore, with a configurable grace period and verified deletion via a K8s CronJob. Content is write-once: each upload always produces a new unique ContentReference. Content sharing (ref_count > 1) will be implemented by copying an existing ContentReference between entities, not by re-uploading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Content lifecycle tracking is always enabled; there is no toggle to turn it off. The domain module has a required (not optional) dependency on the lifecycle module. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…letion Tracks content object references to enable safe, grace-period-based deletion from the underlying ContentStore. - New `contentgrid-appserver-content-lifecycle` module with `ContentReferenceTracker`, `JooqContentReferenceTracker`, `DeferredContentReferenceTracker`, `ContentReferenceVerificationQuery`, `ContentDeletionJob`, and `ContentLifecycleProperties` - `_content_references` table created via `JOOQTableCreator` - Increment reference on upload (`ContentUploadAttributeMapper`) - Decrement reference after entity update/delete clears content (`ContentAttributeModificationValidator` + `DatamodelApiImpl`) - `ContentDeletionJob` implements `ApplicationRunner` for K8s CronJob use, with drift detection, Micrometer metrics, and configurable grace period - `ContentLifecycleAutoConfiguration` wires all beans; registered in `AutoConfiguration.imports`; `ContentGridDomainAutoConfiguration` updated to inject `ContentReferenceTracker` into `DatamodelApiImpl` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Track content object references via a _content_references table. Increment on upload, decrement (deferred to post-commit) on content cleared or entity deleted. ContentDeletionJob performs grace-period-based safe deletion with drift detection and Micrometer metrics. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…greSQL ambiguity PostgreSQL considers the column reference ambiguous in ON CONFLICT DO UPDATE SET reference_count = (reference_count + ?) because reference_count could refer to either the existing row or the EXCLUDED pseudo-table. Qualifying with the table name resolves it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Always run both ./gradlew check and the integration tests before pushing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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.



Need to review myself first