You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sadanand48 (via GitHub)" <gi...@apache.org> on 2023/02/23 18:07:46 UTC

[GitHub] [ozone] sadanand48 opened a new pull request, #4306: HDDS-7906. Addendum: [Snapshot] Wait for checkpoint creation if snapshot in cache and not committed to DB

sadanand48 opened a new pull request, #4306:
URL: https://github.com/apache/ozone/pull/4306

   ## What changes were proposed in this pull request?
   Addendum to #4249 to address [comment](https://github.com/apache/ozone/pull/4249#discussion_r1113303598) received after PR merge.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-7906
   
   ## How was this patch tested?
   UT
   


-- 
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] smengcl commented on a diff in pull request #4306: HDDS-7906. Addendum: [Snapshot] Wait for checkpoint creation if snapshot in cache and not committed to DB

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #4306:
URL: https://github.com/apache/ozone/pull/4306#discussion_r1120770050


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -95,9 +97,11 @@ public OmSnapshot load(@Nonnull String snapshotTableKey)
         // see if the snapshot exists
         snapshotInfo = getSnapshotInfo(snapshotTableKey);
 
-        boolean isSnapshotInCache =
+        CacheValue<SnapshotInfo> cacheValue =
             ozoneManager.getMetadataManager().getSnapshotInfoTable()
-                .getCacheValue(new CacheKey<>(snapshotTableKey)) != null;
+                .getCacheValue(new CacheKey<>(snapshotTableKey));
+        boolean isSnapshotInCache = cacheValue != null && Optional.ofNullable(
+            cacheValue.getCacheValue()).isPresent();

Review Comment:
   Verified manually that this approach would work:
   
   <img width="1469" alt="image" src="https://user-images.githubusercontent.com/50227127/221980152-37acb87e-31ae-45e6-b7a7-4f897d0139d2.png">
   



-- 
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] sadanand48 commented on pull request #4306: HDDS-7906. Addendum: [Snapshot] Wait for checkpoint creation if snapshot in cache and not committed to DB

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on PR #4306:
URL: https://github.com/apache/ozone/pull/4306#issuecomment-1447670690

   > How did we miss to catch this in earlier changes ?
   
   This case would arise on snapshot deletion i.e when snapshot is eventually removed from the snapshot table. Current implementation of delete snapshot only changes the snapshot state but  I guess future patches would include complete deletion and cleanup. @smengcl caught this after the merge.


-- 
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] smengcl merged pull request #4306: HDDS-7906. Addendum: [Snapshot] Wait for checkpoint creation if snapshot in cache and not committed to DB

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl merged PR #4306:
URL: https://github.com/apache/ozone/pull/4306


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