You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/10/21 01:41:34 UTC

[GitHub] [ozone] bharatviswa504 opened a new pull request #2754: HDDS-5875. Do not cache Key Information that should not be persisted.

bharatviswa504 opened a new pull request #2754:
URL: https://github.com/apache/ozone/pull/2754


   ## What changes were proposed in this pull request?
   
   Do not cache token info in KeyInfo when adding to cache/double buffer. As we donot need to persist them to DB and return to client.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-5875
   
   ## How was this patch tested?
   
   Current tests.
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 merged pull request #2754: HDDS-5875. Do not cache tokens as part of Key Information.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #2754:
URL: https://github.com/apache/ozone/pull/2754


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on pull request #2754: HDDS-5875. Do not cache tokens as part of Key Information.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2754:
URL: https://github.com/apache/ozone/pull/2754#issuecomment-949799657


   Thank You @adoroszlai for the review


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a change in pull request #2754: HDDS-5875. Do not cache tokens as part of Key Information.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2754:
URL: https://github.com/apache/ozone/pull/2754#discussion_r733563827



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -197,6 +197,14 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
           new CacheKey<>(dbOpenKey),
           new CacheValue<>(Optional.absent(), trxnLogIndex));
 
+      // Strip out tokens before adding to cache.
+      // This way during listStatus token information does not pass on to
+      // client when returning from cache.
+      if (ozoneManager.isGrpcBlockTokenEnabled()) {
+        omKeyInfo.getLatestVersionLocations().getLocationList()
+            .forEach(keyInfo -> keyInfo.setToken(null));

Review comment:
       `getLocationList()` is expensive (see HDDS-5384).  Can we make the update in this loop above?
   
   https://github.com/apache/ozone/blob/fbb8cf04dfbc21399f29d18b3a40cde071a21ec0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java#L149-L152




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2754: HDDS-5875. Do not cache tokens as part of Key Information.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2754:
URL: https://github.com/apache/ozone/pull/2754#discussion_r733902155



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -197,6 +197,14 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
           new CacheKey<>(dbOpenKey),
           new CacheValue<>(Optional.absent(), trxnLogIndex));
 
+      // Strip out tokens before adding to cache.
+      // This way during listStatus token information does not pass on to
+      // client when returning from cache.
+      if (ozoneManager.isGrpcBlockTokenEnabled()) {
+        omKeyInfo.getLatestVersionLocations().getLocationList()
+            .forEach(keyInfo -> keyInfo.setToken(null));

Review comment:
       Thanks @adoroszlai for info. Nice catch.




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org