smengcl commented on code in PR #8450:
URL: https://github.com/apache/ozone/pull/8450#discussion_r2103172392
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -186,9 +173,116 @@ public void setKeyLimitPerTask(int keyLimitPerTask) {
*/
private final class KeyDeletingTask implements BackgroundTask {
private final KeyDeletingService deletingService;
+ private final UUID snapshotId;
- private KeyDeletingTask(KeyDeletingService service) {
+ private KeyDeletingTask(KeyDeletingService service, UUID snapshotId) {
this.deletingService = service;
+ this.snapshotId = snapshotId;
+ }
+
+ private OzoneManagerProtocolProtos.SetSnapshotPropertyRequest
getSetSnapshotRequestUpdatingExclusiveSize(
+ Map<UUID, Long> exclusiveSizeMap, Map<UUID, Long>
exclusiveReplicatedSizeMap, UUID snapshotID) {
+ OzoneManagerProtocolProtos.SnapshotSize snapshotSize =
OzoneManagerProtocolProtos.SnapshotSize.newBuilder()
+ .setExclusiveSize(
+ exclusiveSizeMap.getOrDefault(snapshotID, 0L))
+ .setExclusiveReplicatedSize(
+ exclusiveReplicatedSizeMap.getOrDefault(
+ snapshotID, 0L))
+ .build();
+ exclusiveSizeMap.remove(snapshotID);
+ exclusiveReplicatedSizeMap.remove(snapshotID);
+
+ return OzoneManagerProtocolProtos.SetSnapshotPropertyRequest.newBuilder()
+ .setSnapshotKey(snapshotChainManager.getTableKey(snapshotID))
+ .setSnapshotSize(snapshotSize)
+ .build();
+ }
+
+ /**
+ *
+ * @param currentSnapshotInfo if null, deleted directories in AOS should
be processed.
+ * @param keyManager KeyManager of the underlying store.
+ */
+ private void processDeletedKeysForStore(SnapshotInfo currentSnapshotInfo,
KeyManager keyManager,
+ int remainNum) throws IOException, InterruptedException {
+ String volume = null, bucket = null, snapshotTableKey = null;
+ if (currentSnapshotInfo != null) {
+ volume = currentSnapshotInfo.getVolumeName();
+ bucket = currentSnapshotInfo.getBucketName();
+ snapshotTableKey = currentSnapshotInfo.getTableKey();
+ }
+
+ String startKey = null;
Review Comment:
Looks like `startKey` is never updated. Is this intended?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]