This is an automated email from the ASF dual-hosted git repository.
adoroszlai 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 62508ed291 HDDS-9687. Handle key deletion with OM Ratis disabled
(#5600)
62508ed291 is described below
commit 62508ed29143e5f04ddf229e37bf2a073acc10e9
Author: z-bb <[email protected]>
AuthorDate: Tue Nov 21 05:19:57 2023 +0800
HDDS-9687. Handle key deletion with OM Ratis disabled (#5600)
---
.../ozone/om/service/AbstractKeyDeletingService.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java
index 6c8a111f1d..1091053ebd 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java
@@ -309,10 +309,15 @@ public abstract class AbstractKeyDeletingService extends
BackgroundService
// Submit Purge paths request to OM
try {
- RaftClientRequest raftClientRequest =
- createRaftClientRequestForPurge(omRequest);
- ozoneManager.getOmRatisServer().submitRequest(omRequest,
- raftClientRequest);
+ if (isRatisEnabled()) {
+ RaftClientRequest raftClientRequest =
+ createRaftClientRequestForPurge(omRequest);
+ ozoneManager.getOmRatisServer().submitRequest(omRequest,
+ raftClientRequest);
+ } else {
+ getOzoneManager().getOmServerProtocol()
+ .submitRequest(null, omRequest);
+ }
} catch (ServiceException e) {
LOG.error("PurgePaths request failed. Will retry at next run.");
}
@@ -445,8 +450,7 @@ public abstract class AbstractKeyDeletingService extends
BackgroundService
}
}
- // TODO: need to handle delete with non-ratis
- if (isRatisEnabled() && !purgePathRequestList.isEmpty()) {
+ if (!purgePathRequestList.isEmpty()) {
submitPurgePaths(purgePathRequestList, snapTableKey);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]