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

feat(python, rust): cleanup expired logs post-commit hook #2459

Merged
merged 10 commits into from
Jul 26, 2024

Conversation

ion-elgreco
Copy link
Collaborator

@ion-elgreco ion-elgreco commented Apr 28, 2024

Description

This adds the cleanup expired logs post-commit hook. Tables by default have delta.enableExpiredLogCleanup = true, and delta.logRetentionDuration = interval 30 days. So moving forward those logs will be automatically cleaned up.

If users set delta.enableExpiredLogCleanup = false during table creation, the log clean up will never be executed in the post-commit. When cleanup_expired_logs in the post-commit hook properties is passed, then that take precedence over the table config.

Additionally to most operations you can now pass in Python the PostCommitHookProperties to control the post commit hook, only really needed for advanced use cases, where you want to disable creating checkpoints across the board or override the log clean up.

@Blajda this is a follow up PR of the hooks, will look into creating an auto_vacuum_hook afterwards

@ion-elgreco ion-elgreco requested a review from Blajda April 28, 2024 12:08
@github-actions github-actions bot added binding/python Issues for the Python package binding/rust Issues for the Rust crate labels Apr 28, 2024
@ion-elgreco ion-elgreco enabled auto-merge (squash) April 28, 2024 12:34
@ion-elgreco ion-elgreco force-pushed the feat/clean_up_logs_hook branch 2 times, most recently from 9caad18 to 5699b61 Compare May 2, 2024 20:18
@rtyler rtyler self-assigned this Jul 25, 2024
@rtyler
Copy link
Member

rtyler commented Jul 25, 2024

I am working on resolving conflicts here for a merge

@rtyler
Copy link
Member

rtyler commented Jul 25, 2024

The copy paste needed for this change really really motivates me to work on the middleware concept more when I'm more fully online 🧟

@ion-elgreco
Copy link
Collaborator Author

The copy paste needed for this change really really motivates me to work on the middleware concept more when I'm more fully online 🧟

Which copy paste do you mean?

@rtyler
Copy link
Member

rtyler commented Jul 25, 2024

@ion-elgreco there are a lot of conflicts related to the handling of commit properties and post commit hook behavior that I hope we can consolidate. 🤞

@ion-elgreco ion-elgreco merged commit e75a0b4 into delta-io:main Jul 26, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants