ChenSammi commented on code in PR #5445:
URL: https://github.com/apache/ozone/pull/5445#discussion_r1387501918


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3SecretManagerImpl.java:
##########
@@ -128,4 +132,19 @@ public S3SecretCache cache() {
   public S3Batcher batcher() {
     return s3SecretStore.batcher();
   }
+
+  public void updateCache(String kerberosID, S3SecretValue secret) {
+    S3SecretManager.super.updateCache(kerberosID, secret);
+    // Mark the Kerberos ID as updated.
+    updatedKerberosIDs.add(kerberosID);
+  }
+
+  public void clearCache() {
+    // Remove Kerberos IDs that have been updated from the cache.
+    for (String kerberosID : updatedKerberosIDs) {
+      S3SecretManager.super.invalidateCacheEntry(kerberosID);

Review Comment:
   There are issues here. Invalidate action of an element, previously the 
element will be removed from the cache, currently the element will be marked as 
deleted, which is the secret revoked. So here, mark all accessID as 
deleted/revoked, is not what we want to do. 
   
   Second, we cannot remove all ID in the updatedKerberosIDs without the epoch 
info, for some of the IDs' transaction are not flushed to rocksdb yet.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to