Provide provision to manage policy on table creation#502
Merged
abhisheknath2011 merged 1 commit intolinkedin:mainfrom Mar 19, 2026
Merged
Conversation
225c6fa to
7bca7f9
Compare
…path policy hook Rename TablePolicyUpdater to TablePolicyManager with two methods: - managePoliciesOnCreateIfNeeded: new hook called before table creation (no-op in OSS, overridden in LI to register policies with CPS) - managePoliciesOnUpdateIfNeeded: renamed from updatePoliciesIfNeeded This fixes a bug where active-active replication creates tables with retention policies in Iceberg properties but never registers them with the Central Policy Store, causing the default 23-day LIMITED_RETENTION to be applied by the retention maintenance job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7bca7f9 to
adf1a33
Compare
...s/tables/src/main/java/com/linkedin/openhouse/tables/repository/impl/TablePolicyManager.java
Show resolved
Hide resolved
abhisheknath2011
approved these changes
Mar 19, 2026
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.
Summary
Currently,
TablePolicyUpdaterjust provide mechanism for managing policies on update but not on create. Scenarios like replication where policies are passed along with table creation, there is no way to manage policies. LinkedIn manages retention policies in different system i.e. CPS and there is no provision to register policies in CPS during table creation.This PR provides such extensibility and is called before creating table. The reason for calling this before table creation is that if policy management fails, users can retry table creation based on the error message. On the other hand, if the table is created but policies are not registered with CPS, users would need to explicitly manage the policy. Policy management is assumed to be idempotent.
Changes
For all the boxes checked, please include additional details of the changes made in this pull request.
Testing Done
TablePolicyManagerwhich were missing earlier.For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.
Additional Information
For all the boxes checked, include additional details of the changes made in this pull request.