lasdf1234 opened a new issue, #14676:
URL: https://github.com/apache/gravitino/issues/14676

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `GravitinoStrategyProvider` maps associated policies from 
`listPolicyInfos()` / `getPolicy()` into maintenance strategies without 
checking `policy.enabled()`. A disabled Iceberg maintenance policy can still be 
recommended or submitted by `submit-strategy-jobs`.
   
   Expected: disabled policies are skipped when listing strategies for a table, 
and requesting a disabled policy by name fails with a clear client error.
   
   ### Error message and/or stacktrace
   
   No exception. Dry-run and submit can still print recommendations and create 
jobs for a policy whose `enabled` field is `false`.
   
   ### How to reproduce
   
   1. Attach an enabled Iceberg maintenance policy (for example compaction) to 
a table so the strategy would fire.
   2. Disable the policy (`enabled=false`) and confirm with GET.
   3. Run `submit-strategy-jobs --dry-run` for that table and strategy name.
   
   Actual: a recommendation is still produced (and a real submit can create a 
job).  
   Expected: no recommendation, or a clear error that the policy is disabled.
   
   ### Additional context
   
   Related to partitioned-strategy statistics handling in #14674.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to