ChenSammi commented on code in PR #5089:
URL: https://github.com/apache/ozone/pull/5089#discussion_r1282630452


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMCertStore.java:
##########
@@ -220,6 +222,37 @@ public void removeExpiredCertificate(BigInteger serialID)
     // TODO: Later this allows removal of expired certificates from the system.
   }
 
+  @Override
+  public void removeAllExpiredCertificates() {
+    lock.lock();
+    try (BatchOperation batchOperation =
+             scmMetadataStore.getBatchHandler().initBatchOperation()) {
+      addExpiredCertsToBeRemoved(batchOperation,
+          scmMetadataStore.getValidCertsTable());
+      addExpiredCertsToBeRemoved(batchOperation,
+          scmMetadataStore.getValidSCMCertsTable());
+      scmMetadataStore.getStore().commitBatchOperation(batchOperation);
+    } catch (IOException e) {
+      LOG.error("Error while trying to remove expired certificate.", e);

Review Comment:
   Please throw out the exception here. 



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

Reply via email to