discivigour commented on code in PR #160:
URL: https://github.com/apache/paimon-rust/pull/160#discussion_r3019410929


##########
crates/paimon/src/api/auth/dlf_provider.rs:
##########
@@ -244,7 +244,7 @@ const TOKEN_EXPIRATION_SAFE_TIME_MILLIS: i64 = 3_600_000;
 /// (ROA v2 HMAC-SHA1).
 pub struct DLFAuthProvider {
     uri: String,
-    token: Option<DLFToken>,
+    token: tokio::sync::Mutex<Option<DLFToken>>,

Review Comment:
   Thanks, but I think mutex is better here because get_or_refresh_token() have 
read-then-write operation.



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