Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Incomplete Log Clearance in clear() Method Due to Disabled Foreign Key Constraints #1509

Closed
wants to merge 2 commits into from

Conversation

TheXerr0r
Copy link

@TheXerr0r TheXerr0r commented Aug 25, 2024

Dear Laravel Telescope Maintainers,

I’ve encountered a significant issue related to log clearance in the Laravel Telescope. The recent commit from pull request #1507 that disables foreign key constraints within the DatabaseEntriesRepository::class@clear() method has resulted in incomplete log deletion. Specifically, records in the telescope_entries_tag table are not being cleared, leading to unnecessary database growth over time.

This oversight can result in substantial database bloat, especially in environments with high logging activity. I believe addressing this would greatly benefit the efficiency and performance of the package.

Thank you for your attention to this matter.

Best regards

…clear method

- Refactored the `clear()` method to rely on database cascading deletes, removing the need to disable foreign key constraints.
- Simplified the truncation process to avoid orphaned records and potential database growth.
@TheXerr0r TheXerr0r changed the title - Refactored the clear() method to rely on database cascading deletes, removing the need to disable foreign key constraints. - Simplified the truncation process to avoid orphaned records and potential database growth. Issue with Incomplete Log Clearance in clear() Method Due to Disabled Foreign Key Constraints Aug 25, 2024
Respects Foreign Key Constraints: Unlike TRUNCATE, DELETE respects foreign key constraints and does not require disabling foreign key checks.
@driesvints
Copy link
Member

Thanks. We've reverted this one.

@driesvints driesvints closed this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants