iting0321 commented on code in PR #5135: URL: https://github.com/apache/polaris/pull/5135#discussion_r3640803438
########## persistence/nosql/persistence/metastore-maintenance/src/main/java/org/apache/polaris/persistence/nosql/metastore/maintenance/CatalogsMaintenanceConfig.java: ########## @@ -22,82 +22,116 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import io.smallrye.config.ConfigMapping; import io.smallrye.config.WithDefault; -import java.util.Optional; +import jakarta.validation.constraints.Min; import org.apache.polaris.immutables.PolarisImmutable; +import org.immutables.value.Value; /** * No SQL persistence implementation of Polaris stores a history of changes per kind of object * (principals, principal roles, grants, immediate tasks, catalog roles and catalog state). * - * <p>The rules are defined using a <a href="https://github.com/projectnessie/cel-java/">CEL - * script</a>. The default rules for all kinds of objects are to retain the history for 3 days, for - * the catalog state for 30 days. - * - * <p>The scripts have access to the following declared values: - * - * <ul> - * <li>{@code ref} (string) name of the reference - * <li>{@code commits} (64-bit int) number of the currently processed commit, starting at {@code - * 1} - * <li>{@code ageDays} (64-bit int) age of currently processed commit in days - * <li>{@code ageHours} (64-bit int) age of currently processed commit in hours - * <li>{@code ageMinutes} (64-bit int) age of currently processed commit in minutes - * </ul> - * - * <p>Scripts <em>must</em> return a {@code boolean} yielding whether the commit shall be retained. - * Note that maintenance-service implementations can keep the first not-to-be-retained commit. - * - * <p>Example scripts - * - * <ul> - * <li>{@code ageDays < 30 || commits <= 10} retains the reference history with at least 10 - * commits and commits that are younger than 30 days - * <li>{@code true} retains the whole reference history - * <li>{@code false} retains the most recent commit - * </ul> + * <p>Each configuration property controls how many of the latest commits are retained for one kind + * of history. All properties default to retaining only the latest commit. */ Review Comment: added -- 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]
