Description
Add a lifecycle/retention strategy for old triggers in the DatabaseTriggers collection to prevent unbounded growth.
Proposed Solution
Implement one of the following cleanup strategies:
- Add a TTL (Time To Live) field like
expires_at to automatically remove old documents
- Implement periodic purge of CANCELLED/TRIGGERED triggers older than N days
- Add background job to clean up old trigger records
Context
This enhancement was identified during code review of PR #428 which introduces the trigger system. Without proper cleanup, the DatabaseTriggers collection could grow indefinitely as triggers are executed and completed.
Related Issues
Backlinks
Requested by: @NiveditJain
Description
Add a lifecycle/retention strategy for old triggers in the DatabaseTriggers collection to prevent unbounded growth.
Proposed Solution
Implement one of the following cleanup strategies:
expires_atto automatically remove old documentsContext
This enhancement was identified during code review of PR #428 which introduces the trigger system. Without proper cleanup, the DatabaseTriggers collection could grow indefinitely as triggers are executed and completed.
Related Issues
Backlinks
Requested by: @NiveditJain