ChenSammi commented on code in PR #6033:
URL: https://github.com/apache/ozone/pull/6033#discussion_r1464541228
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/OpenKeyCleanupService.java:
##########
@@ -96,6 +98,17 @@ public OpenKeyCleanupService(long interval, TimeUnit unit,
long timeout,
TimeUnit.MILLISECONDS);
this.expireThreshold = Duration.ofMillis(expireMillis);
+ long leaseHardMillis =
conf.getTimeDuration(OMConfigKeys.OZONE_OM_LEASE_HARD_LIMIT,
+ OMConfigKeys.OZONE_OM_LEASE_HARD_LIMIT_DEFAULT, TimeUnit.MILLISECONDS);
+ long leaseSoftMillis =
conf.getTimeDuration(OzoneConfigKeys.OZONE_OM_LEASE_SOFT_LIMIT,
+ OzoneConfigKeys.OZONE_OM_LEASE_SOFT_LIMIT_DEFAULT,
TimeUnit.MILLISECONDS);
+
+ if (leaseHardMillis < leaseSoftMillis) {
+ this.leaseThreshold = Duration.ofMillis(leaseSoftMillis);
Review Comment:
Sorry, @ashishkumar50 , after a second thought, I think we should throw an
IllegalArgumentException here, instead of use the soft limit as hard limit,
because it will cause severe problems to user. Kindly refer to
SecurityConfig#validateCertificateValidityConfig.
--
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]