brunsgaard commented on code in PR #10141:
URL: https://github.com/apache/paimon/pull/10141#discussion_r4092763214


##########
paimon-python/pypaimon/common/options/config.py:
##########
@@ -256,3 +262,10 @@ class FuseOptions:
             "'raw' uses URI path segments directly"
         )
     )
+
+
+def data_token_expiration_safe_time_millis(options=None) -> int:
+    """Return the refresh window for vended data tokens, in milliseconds."""
+    option = CatalogOptions.DATA_TOKEN_EXPIRATION_SAFE_TIME
+    value = option.default_value() if options is None else options.get(option)
+    return int(value.total_seconds() * 1000)

Review Comment:
   Done in 3cfc7db. The helper converts to milliseconds, checks the result is 
nonnegative and raises `ValueError("data-token.expiration-safe-time must not be 
negative, got ...")`. PVFS reads the window once in `__init__`, so a typed 
negative value fails at construction instead of on the first storage access. 
Regressions: `test_negative_window_is_rejected` (RESTTokenFileIO) and 
`PVFSTokenWindowTest.test_negative_window_is_rejected_at_construction` (PVFS).



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