[ https://issues.apache.org/jira/browse/HDFS-12519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198196#comment-16198196 ]
Yiqun Lin commented on HDFS-12519: ---------------------------------- [~nandakumar131], thanks for your patient explanation. I have some wrong understanding of LOG.isDebug(). Thanks for correcting me. The new change of {{LOG.isDebugEnabled()}} looks good to me. bq. I agree on this point, but even if we remove the timeout option while acquiring lease we will be stuck with the same problem. Lets assume we are running lease monitor in fixed interval of time Makes sense to me, I agree on this and scenario you mentioned. One comment for your latest patch, As you also mentioned, finally part in {{LeaseMonitor#run}} can be removed as it's already running inside while loop. line {{leaseMonitorThread.interrupt();}} in acquire method is still needed? {code} + public synchronized Lease<T> acquire(T resource, long timeout) + throws LeaseAlreadyExistException { + checkStatus(); + if(LOG.isDebugEnabled()) { + LOG.debug("Acquiring lease on {} for {} milliseconds", resource, timeout); + } + if(activeLeases.containsKey(resource)) { + throw new LeaseAlreadyExistException("Resource: " + resource); + } + Lease<T> lease = new Lease<>(resource, timeout); + activeLeases.put(resource, lease); + leaseMonitorThread.interrupt(); <========= + return lease; + } {code} > Ozone: Add a Lease Manager to SCM > --------------------------------- > > Key: HDFS-12519 > URL: https://issues.apache.org/jira/browse/HDFS-12519 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ozone > Reporter: Anu Engineer > Assignee: Nandakumar > Labels: OzonePostMerge > Attachments: HDFS-12519-HDFS-7240.000.patch, > HDFS-12519-HDFS-7240.001.patch, HDFS-12519-HDFS-7240.002.patch > > > Many objects, including Containers and pipelines can time out during creating > process. We need a way to track these timeouts. This lease Manager allows SCM > to hold a lease on these objects and helps SCM timeout waiting for creating > of these objects. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org