jerryshao commented on code in PR #11364:
URL: https://github.com/apache/gravitino/pull/11364#discussion_r3345677979
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/listener/api/event/IcebergRequestContext.java:
##########
@@ -113,6 +116,24 @@ public Map<String, String> httpHeaders() {
return httpHeaders;
}
+ /**
+ * Checks whether this request opted into asynchronous table purge.
+ *
+ * <p>Async purge is opt-in. Standard Iceberg clients send no header and
keep synchronous purge
+ * behavior; a client opts in with {@code X-Gravitino-Async-Purge: True}.
+ *
+ * @return true only when the async purge header explicitly says {@code True}
+ */
+ public boolean asyncPurge() {
+ for (Map.Entry<String, String> header : httpHeaders.entrySet()) {
+ // HTTP header names are case-insensitive; the value is matched exactly
as "True".
+ if (ASYNC_PURGE_HEADER.equalsIgnoreCase(header.getKey())) {
+ return "True".equals(header.getValue().trim());
Review Comment:
So we only support `True`, right?
--
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]