You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by "eric-maynard (via GitHub)" <gi...@apache.org> on 2024/09/04 19:07:01 UTC

Re: [PR] Notification API reject out of order notifications [polaris]

eric-maynard commented on code in PR #232:
URL: https://github.com/apache/polaris/pull/232#discussion_r1744288157


##########
polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -1874,10 +1874,21 @@ private boolean sendNotificationForTableLike(
                         .getMetaStoreManager()
                         .generateNewEntityId(getCurrentPolarisContext())
                         .getId())
+                .setLastNotificationTimestamp(request.getPayload().getTimestamp())
                 .build();
       } else {
+        // If the notification timestamp is outdated, we should not update the table
+        if (entity.getLastNotificationTimestamp() != null

Review Comment:
   Instead of `null`, can we use `Optional`?



-- 
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: commits-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org