flyrain commented on code in PR #1274: URL: https://github.com/apache/polaris/pull/1274#discussion_r2025186858
########## polaris-core/src/main/java/org/apache/polaris/core/persistence/BasePersistence.java: ########## @@ -37,6 +37,11 @@ * defining the internal data model for Polaris, and which defines the basis for the RBAC model * provided by Polaris. * + * <p>Each method in this interface must be atomic, meaning that write operations must either fully + * succeed with all changes applied, or fail entirely without any side effects or partial updates. + * Read operations must return a consistent view of the data as it existed at a specific point in Review Comment: This doc update clarifies that snapshot read is required for each read method. Currently, the listEntities implementation provides an even stronger consistency guarantee, as shown in the following transactional code. Are we planning to relax this to allow even non-snapshot reads? I think it's worth discussing this on the mailing list. That said, I don’t believe it should block this PR. ``` public <T> List<T> listEntities( @Nonnull PolarisCallContext callCtx, long catalogId, long parentId, @Nonnull PolarisEntityType entityType, int limit, @Nonnull Predicate<PolarisBaseEntity> entityFilter, @Nonnull Function<PolarisBaseEntity, T> transformer) { return runInReadTransaction( callCtx, () -> this.listEntitiesInCurrentTxn( callCtx, catalogId, parentId, entityType, limit, entityFilter, transformer)); } ``` -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org