Skip to content

Conversation

@HonahX
Copy link
Contributor

@HonahX HonahX commented May 20, 2025

This PR adds policyTypeCode to both the in-memory tree map store's slice and the SQL table policy_mapping_records index (JDBC has already included this in #1468 ). This change lays the groundwork for future features that require efficient filtering by policy type—such as fetching all entities with a data compaction policy attached.

As part of this update, the signature of loadAllTargetsOnPolicy is also modified to accept policyTypeCode, allowing the method to take advantage of the new index for improved performance.

cc: @flyrain @singhpk234

@github-project-automation github-project-automation bot moved this to PRs In Progress in Basic Kanban Board May 20, 2025
@HonahX HonahX changed the title Add policyTypeCode to slice/index for optimization and future feature [Draft] Add policyTypeCode to slice/index for optimization and future feature May 20, 2025
@HonahX HonahX changed the title [Draft] Add policyTypeCode to slice/index for optimization and future feature [Policy Store] Add policyTypeCode to Slice/Index for Future Filtering Support and Update Policy Persistence Method May 20, 2025
@HonahX HonahX marked this pull request as ready for review May 20, 2025 20:17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's worth bothering with EclipseLink support for new features since EclipseLink is deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with either way. Adding it to EclipseLink is nice to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since policy support is already available in EclipseLink and this PR introduces only a minor change ahead of the 1.0 release, I think it's reasonable to include it. My understanding is that we don’t plan to add any major new features to EclipseLink moving forward.

Copy link
Contributor

@flyrain flyrain May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker: I feel like these two classes are interchangeable in Polaris. Can we merge them to avoid any type mismatching like this? cc @dennishuo

flyrain
flyrain previously approved these changes May 21, 2025
Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board May 21, 2025
@dimas-b
Copy link
Contributor

dimas-b commented May 22, 2025

Please rebase to get the latest CI changes

@HonahX HonahX force-pushed the honahx_load_all_targets_on_policy_refactor branch from 4395fbb to dc12b13 Compare May 22, 2025 17:05
@HonahX HonahX requested a review from ajantha-bhat as a code owner May 22, 2025 17:05
dimas-b
dimas-b previously approved these changes May 22, 2025
default void deleteAllEntityPolicyMappingRecordsInCurrentTxn(
@Nonnull PolarisCallContext callCtx,
@Nonnull PolarisEntityCore entity,
@Nonnull PolarisBaseEntity entity,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note: we should probably review the PolarisEntityCore type hierarchy. PolarisBaseEntity dominates all child types, so it can probably be folded into PolarisEntityCore (or the other way around).

singhpk234
singhpk234 previously approved these changes May 22, 2025
@HonahX HonahX dismissed stale reviews from singhpk234, dimas-b, and flyrain via 437653c May 22, 2025 20:51
@HonahX HonahX merged commit a534193 into apache:main May 22, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board May 22, 2025
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.

4 participants