curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (CURATOR-530) Documentation on InterProcessSemaphoreMutex is misleading
Date Wed, 10 Jul 2019 16:40:00 GMT

     [ https://issues.apache.org/jira/browse/CURATOR-530?focusedWorklogId=274944&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-274944
]

ASF GitHub Bot logged work on CURATOR-530:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jul/19 16:39
            Start Date: 10/Jul/19 16:39
    Worklog Time Spent: 10m 
      Work Description: shayshim commented on pull request #315: [CURATOR-530] Documentation
on InterProcessSemaphoreMutex is misleading
URL: https://github.com/apache/curator/pull/315#discussion_r302164607
 
 

 ##########
 File path: curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessLock.java
 ##########
 @@ -44,7 +44,7 @@
     /**
      * Perform one release of the mutex.
      *
-     * @throws Exception ZK errors, interruptions, current thread does not own the lock
+     * @throws Exception ZK errors, interruptions
 
 Review comment:
   On the one hand it seems true that not all implementations throw exception in case of different
thread, on the other hand, after removing this comment from the interface - its users cannot
be aware of the possibility that this exception can be thrown (depending on the implementation).
So user that did not create this InterProcessLock, but calls release() from different thread,
might be surprised of the IllegalMonitorStateException (in case it is InterProcessMutex, for
instance).
   Maybe add above the interface InterProcessLock top level javadoc (empty currently):
   NOTE: depending on its implementation, InterProcessLock#release() might throw exception
if current thread does not own the lock
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 274944)
    Time Spent: 0.5h  (was: 20m)

> Documentation on InterProcessSemaphoreMutex is misleading
> ---------------------------------------------------------
>
>                 Key: CURATOR-530
>                 URL: https://issues.apache.org/jira/browse/CURATOR-530
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 4.0.1
>            Reporter: Emre Tetik
>            Priority: Major
>              Labels: documentation, easyfix, pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The documentation for the release() method in InterProcessSemaphoreMutex says that it
will throw an exception if the method is called on a thread other than the one which acquired
the lock: [https://curator.apache.org/apidocs/org/apache/curator/framework/recipes/locks/InterProcessSemaphoreMutex.html#release--]
> This is not correct, and should be changed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message