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/29 00:07:50 UTC

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

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