This is an automated email from the ASF dual-hosted git repository.
bharat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new ba038e4 HDDS-5875. Do not cache tokens as part of Key Information.
(#2754)
ba038e4 is described below
commit ba038e4b3820a2b81193ac8a10cf99ae942d700a
Author: Bharat Viswanadham <[email protected]>
AuthorDate: Fri Oct 22 09:46:58 2021 -0700
HDDS-5875. Do not cache tokens as part of Key Information. (#2754)
---
.../hadoop/ozone/om/request/key/OMKeyCommitRequest.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
index 394e7df..639addc 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
@@ -148,7 +148,16 @@ public class OMKeyCommitRequest extends OMKeyRequest {
List<OmKeyLocationInfo> locationInfoList = new ArrayList<>();
for (KeyLocation keyLocation : commitKeyArgs.getKeyLocationsList()) {
- locationInfoList.add(OmKeyLocationInfo.getFromProtobuf(keyLocation));
+ OmKeyLocationInfo locationInfo =
+ OmKeyLocationInfo.getFromProtobuf(keyLocation);
+
+ // 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()) {
+ locationInfo.setToken(null);
+ }
+ locationInfoList.add(locationInfo);
}
bucketLockAcquired =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]