You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2026/09/22 05:31:35 UTC
(paimon) branch master updated: [common] Limit REST token lifetime check to presigned URLs
This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 6d115a9666 [common] Limit REST token lifetime check to presigned URLs
6d115a9666 is described below
commit 6d115a966619c0e340bb477bb8f14d8f33161b8d
Author: JingsongLi <ji...@gmail.com>
AuthorDate: Tue Sep 22 13:31:02 2026 +0800
[common] Limit REST token lifetime check to presigned URLs
---
.../src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java b/paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java
index 6e469db3ee..830fe058c4 100644
--- a/paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java
+++ b/paimon-common/src/main/java/org/apache/paimon/rest/RESTTokenFileIO.java
@@ -238,7 +238,8 @@ public class RESTTokenFileIO implements FileIO {
private FileIOWithToken fileIOWithToken(long minimumValidityMillis) throws IOException {
tryToRefreshToken(minimumValidityMillis);
RESTToken currentToken = token;
- if (!hasRemainingLifetime(currentToken, minimumValidityMillis)) {
+ if (minimumValidityMillis > 0
+ && !hasRemainingLifetime(currentToken, minimumValidityMillis)) {
throw new IOException(
"Requested presigned URL validity exceeds the remaining "
+ "REST credential lifetime after refresh.");