dimas-b commented on code in PR #3915:
URL: https://github.com/apache/polaris/pull/3915#discussion_r2898608931


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/IdempotencyStore.java:
##########
@@ -131,29 +132,53 @@ ReserveResult reserve(
   HeartbeatResult updateHeartbeat(
       String realmId, String idempotencyKey, String executorId, Instant now);
 
+  /**
+   * Cancels (deletes) an in-progress idempotency reservation owned by {@code 
executorId}.
+   *
+   * <p>This is used for cases where an idempotency key was reserved but the 
request should not be
+   * tracked for replay (for example, 401/403/408/429 responses per the 
proposal). Implementations
+   * should only cancel the record if it is still in-progress (i.e., not 
finalized) and owned by the
+   * given executor.
+   *
+   * @param realmId logical tenant or realm identifier
+   * @param idempotencyKey application-provided idempotency key
+   * @param executorId identifier of the executor that owns the reservation
+   * @return {@code true} if a record was cancelled, {@code false} otherwise

Review Comment:
   If the return value does not affect the outcome on the caller's side, why 
declare a return value for this method at all?



-- 
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