Skip to content

Provide provision to manage policy on table creation#502

Merged
abhisheknath2011 merged 1 commit intolinkedin:mainfrom
dushyantk1509:dushyantk1509/fix-cps-policy-on-table-create
Mar 19, 2026
Merged

Provide provision to manage policy on table creation#502
abhisheknath2011 merged 1 commit intolinkedin:mainfrom
dushyantk1509:dushyantk1509/fix-cps-policy-on-table-create

Conversation

@dushyantk1509
Copy link
Contributor

@dushyantk1509 dushyantk1509 commented Mar 17, 2026

Summary

Currently, TablePolicyUpdater just 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

  • Client-facing API Changes
  • Internal API Changes
  • Bug Fixes
  • New Features
  • Performance Improvements
  • Code Style
  • Refactoring
  • Documentation
  • Tests

For all the boxes checked, please include additional details of the changes made in this pull request.

Testing Done

  • Manually Tested on local docker setup. Please include commands ran, and their output.
  • Added new tests for the changes made.
  • Updated existing tests to reflect the changes made.
  • No tests added or updated. Please explain why. If unsure, please feel free to ask for help. - No functional change... just refactoring. Added unit tests for TablePolicyManager which were missing earlier.
  • Some other form of testing like staging or soak time in production. Please explain.

For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.

Additional Information

  • Breaking Changes
  • Deprecations
  • Large PR broken into smaller PRs, and PR plan linked in the description.

For all the boxes checked, include additional details of the changes made in this pull request.

@dushyantk1509 dushyantk1509 force-pushed the dushyantk1509/fix-cps-policy-on-table-create branch from 225c6fa to 7bca7f9 Compare March 17, 2026 06:37
…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>
@dushyantk1509 dushyantk1509 force-pushed the dushyantk1509/fix-cps-policy-on-table-create branch from 7bca7f9 to adf1a33 Compare March 17, 2026 06:40
@dushyantk1509 dushyantk1509 marked this pull request as ready for review March 17, 2026 06:57
@abhisheknath2011 abhisheknath2011 merged commit fcb69a8 into linkedin:main Mar 19, 2026
1 check passed
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