dimas-b commented on code in PR #5095:
URL: https://github.com/apache/polaris/pull/5095#discussion_r3648724404
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/BasePersistence.java:
##########
@@ -158,6 +158,23 @@ void writeToGrantRecords(
*/
void deleteEntity(@NonNull PolarisCallContext callCtx, @NonNull
PolarisBaseEntity entity);
+ /**
+ * Delete one entity and create the supplied entities in one atomic
persistence operation. If the
+ * operation succeeds, the deleted entity must be durably removed and every
created entity must be
+ * durably visible; if it fails, none of those changes may be applied.
+ *
+ * <p>The created entities use the same create semantics as {@link
+ * #writeEntities(PolarisCallContext, List, List)} with {@code
originalEntities == null}.
+ *
+ * @param callCtx call context
+ * @param entityToDelete entity to delete
+ * @param entitiesToCreate entities to create atomically with the delete
+ */
+ void deleteEntityAndCreateEntities(
Review Comment:
This seems to be related to the bigger multi-entity change discussion on
`dev`: https://lists.apache.org/thread/vx0k8ow4k87m4y7cxpmojb0zy17t5ldy
I think we need to reach consensus on that thread "in general" before making
code-level improvements,
--
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]