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 2020/01/16 15:16:06 UTC

[GitHub] [hadoop-ozone] hanishakoneru opened a new pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

hanishakoneru opened a new pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450
 
 
   ## What changes were proposed in this pull request?
   
   If KeyPurgeRequest is replayed, we do not want to purge the keys which were created after the original purge request was received. This could happen if a key was deleted, purged and then created and deleted again. The the purge request was replayed, it would purge the key deleted after the original purge request was completed.
   Hence, to maintain idempotence, we should only purge those keys from DeletedKeys table that have updateID < transactionLogIndex of the request.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-2893
   
   ## How was this patch tested?
   
   Unit test will be added in next commit

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r372139187
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -49,25 +57,76 @@ public OMKeyPurgeRequest(OMRequest omRequest) {
   public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       long transactionLogIndex,
       OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
-    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
-    List<String> purgeKeysList = purgeKeysRequest.getKeysList();
 
-    LOG.debug("Processing Purge Keys for {} number of keys.",
-        purgeKeysList.size());
+    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
+
+    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
+    List<DeletedKeys> bucketDeletedKeysList = purgeKeysRequest
+        .getDeletedKeysList();
+    List<String> keysToBePurgedList = new ArrayList<>();
 
-    OMResponse omResponse = OMResponse.newBuilder()
+    OMResponse.Builder omResponse = OMResponse.newBuilder()
         .setCmdType(Type.PurgeKeys)
-        .setPurgeKeysResponse(
-            OzoneManagerProtocolProtos.PurgeKeysResponse.newBuilder().build())
+        .setPurgeKeysResponse(PurgeKeysResponse.newBuilder().build())
         .setStatus(Status.OK)
-        .setSuccess(true)
-        .build();
+        .setSuccess(true);
+    OMClientResponse omClientResponse = null;
+    boolean success = true;
+    IOException exception = null;
+
+    // Filter the keys that objectID > transactionLogIndex. This is done so
+    // that in case this transaction is a replay, we do not purge keys
+    // created after the original purge request.
+    // PurgeKeys request has keys belonging to same bucket grouped together.
+    // We get each bucket lock and check the above condition.
+    for (DeletedKeys bucketWithDeleteKeys : bucketDeletedKeysList) {
+      boolean acquiredLock = false;
+      String volumeName = bucketWithDeleteKeys.getVolumeName();
+      String bucketName = bucketWithDeleteKeys.getBucketName();
+      try {
+        acquiredLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,
+            volumeName, bucketName);
+        for (String deletedKey : bucketWithDeleteKeys.getKeysList()) {
+          RepeatedOmKeyInfo repeatedOmKeyInfo =
+              omMetadataManager.getDeletedTable().get(deletedKey);
+          boolean purgeKey = true;
+          if (repeatedOmKeyInfo != null) {
+            for (OmKeyInfo omKeyInfo : repeatedOmKeyInfo.getOmKeyInfoList()) {
+              // Discard those keys whose updateID is > transactionLogIndex.
+              // This could happen when the PurgeRequest is replayed.
+              if (isReplay(ozoneManager, omKeyInfo.getUpdateID(),
+                  transactionLogIndex)) {
+                purgeKey = false;
+                break;
+              }
+            }
+            if (purgeKey) {
 
 Review comment:
   As discussed offline.
   Here there is a chance of not deleting the old keyInfo from RepeatedKeyInfo when a new Key with transaction ID greater than the transactionLogIndex of purgeKeyRequest. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r373293601
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -115,18 +126,42 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
               bucketName);
         }
       }
+
+      if (result == Result.REPLAY) {
+        LOG.debug("Replayed Transaction {}. Request: {}", trxnLogIndex,
+            purgeKeysRequest);
+        if (!keysNotPurged.isEmpty()) {
 
 Review comment:
   Minor: We can use the Java8 String method String.join(", list)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] hanishakoneru commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
hanishakoneru commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#issuecomment-580958415
 
 
   Sorry missed pushing the new commit. Added it now.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r372128131
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -49,25 +57,76 @@ public OMKeyPurgeRequest(OMRequest omRequest) {
   public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       long transactionLogIndex,
       OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
-    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
-    List<String> purgeKeysList = purgeKeysRequest.getKeysList();
 
-    LOG.debug("Processing Purge Keys for {} number of keys.",
-        purgeKeysList.size());
+    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
+
+    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
+    List<DeletedKeys> bucketDeletedKeysList = purgeKeysRequest
+        .getDeletedKeysList();
+    List<String> keysToBePurgedList = new ArrayList<>();
 
-    OMResponse omResponse = OMResponse.newBuilder()
+    OMResponse.Builder omResponse = OMResponse.newBuilder()
         .setCmdType(Type.PurgeKeys)
-        .setPurgeKeysResponse(
-            OzoneManagerProtocolProtos.PurgeKeysResponse.newBuilder().build())
+        .setPurgeKeysResponse(PurgeKeysResponse.newBuilder().build())
         .setStatus(Status.OK)
-        .setSuccess(true)
-        .build();
+        .setSuccess(true);
+    OMClientResponse omClientResponse = null;
+    boolean success = true;
+    IOException exception = null;
+
+    // Filter the keys that objectID > transactionLogIndex. This is done so
 
 Review comment:
   objectID  -> updatedID

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r373293803
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -115,18 +126,42 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
               bucketName);
         }
       }
+
+      if (result == Result.REPLAY) {
+        LOG.debug("Replayed Transaction {}. Request: {}", trxnLogIndex,
+            purgeKeysRequest);
+        if (!keysNotPurged.isEmpty()) {
 
 Review comment:
   And also as discussed offline for debug statements we can use isDebugEnabled, so that parameter conversion will not happen. If you want, we can open a new Jira to address this and above.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 merged pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r372141435
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -49,25 +57,76 @@ public OMKeyPurgeRequest(OMRequest omRequest) {
   public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       long transactionLogIndex,
       OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
-    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
-    List<String> purgeKeysList = purgeKeysRequest.getKeysList();
 
-    LOG.debug("Processing Purge Keys for {} number of keys.",
-        purgeKeysList.size());
+    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
+
+    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
+    List<DeletedKeys> bucketDeletedKeysList = purgeKeysRequest
+        .getDeletedKeysList();
+    List<String> keysToBePurgedList = new ArrayList<>();
 
-    OMResponse omResponse = OMResponse.newBuilder()
+    OMResponse.Builder omResponse = OMResponse.newBuilder()
         .setCmdType(Type.PurgeKeys)
-        .setPurgeKeysResponse(
-            OzoneManagerProtocolProtos.PurgeKeysResponse.newBuilder().build())
+        .setPurgeKeysResponse(PurgeKeysResponse.newBuilder().build())
         .setStatus(Status.OK)
-        .setSuccess(true)
-        .build();
+        .setSuccess(true);
+    OMClientResponse omClientResponse = null;
+    boolean success = true;
+    IOException exception = null;
+
+    // Filter the keys that objectID > transactionLogIndex. This is done so
+    // that in case this transaction is a replay, we do not purge keys
+    // created after the original purge request.
+    // PurgeKeys request has keys belonging to same bucket grouped together.
+    // We get each bucket lock and check the above condition.
+    for (DeletedKeys bucketWithDeleteKeys : bucketDeletedKeysList) {
+      boolean acquiredLock = false;
+      String volumeName = bucketWithDeleteKeys.getVolumeName();
+      String bucketName = bucketWithDeleteKeys.getBucketName();
+      try {
+        acquiredLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,
+            volumeName, bucketName);
+        for (String deletedKey : bucketWithDeleteKeys.getKeysList()) {
+          RepeatedOmKeyInfo repeatedOmKeyInfo =
+              omMetadataManager.getDeletedTable().get(deletedKey);
+          boolean purgeKey = true;
+          if (repeatedOmKeyInfo != null) {
+            for (OmKeyInfo omKeyInfo : repeatedOmKeyInfo.getOmKeyInfoList()) {
+              // Discard those keys whose updateID is > transactionLogIndex.
+              // This could happen when the PurgeRequest is replayed.
+              if (isReplay(ozoneManager, omKeyInfo.getUpdateID(),
+                  transactionLogIndex)) {
+                purgeKey = false;
+                break;
+              }
+            }
+            if (purgeKey) {
+              keysToBePurgedList.add(deletedKey);
+            }
+          }
+        }
+      } catch (IOException ex) {
+        success = false;
+        exception = ex;
+        break;
+      } finally {
+        if (acquiredLock) {
+          omMetadataManager.getLock().releaseWriteLock(BUCKET_LOCK, volumeName,
+              bucketName);
 
 Review comment:
   Can we add some logging for replay case and normal logging also which will help in debugging

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r372139187
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -49,25 +57,76 @@ public OMKeyPurgeRequest(OMRequest omRequest) {
   public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       long transactionLogIndex,
       OzoneManagerDoubleBufferHelper ozoneManagerDoubleBufferHelper) {
-    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
-    List<String> purgeKeysList = purgeKeysRequest.getKeysList();
 
-    LOG.debug("Processing Purge Keys for {} number of keys.",
-        purgeKeysList.size());
+    OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
+
+    PurgeKeysRequest purgeKeysRequest = getOmRequest().getPurgeKeysRequest();
+    List<DeletedKeys> bucketDeletedKeysList = purgeKeysRequest
+        .getDeletedKeysList();
+    List<String> keysToBePurgedList = new ArrayList<>();
 
-    OMResponse omResponse = OMResponse.newBuilder()
+    OMResponse.Builder omResponse = OMResponse.newBuilder()
         .setCmdType(Type.PurgeKeys)
-        .setPurgeKeysResponse(
-            OzoneManagerProtocolProtos.PurgeKeysResponse.newBuilder().build())
+        .setPurgeKeysResponse(PurgeKeysResponse.newBuilder().build())
         .setStatus(Status.OK)
-        .setSuccess(true)
-        .build();
+        .setSuccess(true);
+    OMClientResponse omClientResponse = null;
+    boolean success = true;
+    IOException exception = null;
+
+    // Filter the keys that objectID > transactionLogIndex. This is done so
+    // that in case this transaction is a replay, we do not purge keys
+    // created after the original purge request.
+    // PurgeKeys request has keys belonging to same bucket grouped together.
+    // We get each bucket lock and check the above condition.
+    for (DeletedKeys bucketWithDeleteKeys : bucketDeletedKeysList) {
+      boolean acquiredLock = false;
+      String volumeName = bucketWithDeleteKeys.getVolumeName();
+      String bucketName = bucketWithDeleteKeys.getBucketName();
+      try {
+        acquiredLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,
+            volumeName, bucketName);
+        for (String deletedKey : bucketWithDeleteKeys.getKeysList()) {
+          RepeatedOmKeyInfo repeatedOmKeyInfo =
+              omMetadataManager.getDeletedTable().get(deletedKey);
+          boolean purgeKey = true;
+          if (repeatedOmKeyInfo != null) {
+            for (OmKeyInfo omKeyInfo : repeatedOmKeyInfo.getOmKeyInfoList()) {
+              // Discard those keys whose updateID is > transactionLogIndex.
+              // This could happen when the PurgeRequest is replayed.
+              if (isReplay(ozoneManager, omKeyInfo.getUpdateID(),
+                  transactionLogIndex)) {
+                purgeKey = false;
+                break;
+              }
+            }
+            if (purgeKey) {
 
 Review comment:
   As discussed offline.
   Here there is a chance of deleting the old keyInfo from RepeatedKeyInfo when a new Key with transaction ID greater than the transactionLogIndex of purgeKeyRequest. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#issuecomment-580949746
 
 
   @hanishakoneru I don't see any latest commit, the last commit is from Yesterday.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] hanishakoneru commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
hanishakoneru commented on issue #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#issuecomment-580836450
 
 
   Thanks for the review @bharatviswa504 . Addressed your comments and fixed CI issues. Can you please take a look.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r373293803
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -115,18 +126,42 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
               bucketName);
         }
       }
+
+      if (result == Result.REPLAY) {
+        LOG.debug("Replayed Transaction {}. Request: {}", trxnLogIndex,
+            purgeKeysRequest);
+        if (!keysNotPurged.isEmpty()) {
 
 Review comment:
   And also as discussed offline for debug statements we can use isDebugEnabled, so that parameter conversion will not happen.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #450: HDDS-2893. Handle replay of KeyPurge Request.
URL: https://github.com/apache/hadoop-ozone/pull/450#discussion_r373293601
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java
 ##########
 @@ -115,18 +126,42 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
               bucketName);
         }
       }
+
+      if (result == Result.REPLAY) {
+        LOG.debug("Replayed Transaction {}. Request: {}", trxnLogIndex,
+            purgeKeysRequest);
+        if (!keysNotPurged.isEmpty()) {
 
 Review comment:
   NIT: We can use the Java8 String method String.join(", list)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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