hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18233) We shouldn't wait for readlock in doMiniBatchMutation in case of deadlock
Date Mon, 19 Jun 2017 06:30:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053520#comment-16053520
] 

Allan Yang commented on HBASE-18233:
------------------------------------

Hi, [~stack], tryLock() with no parameter means do not wait for this lock. please see the
java docs:
{code}
/**
     * Acquires the lock only if it is free at the time of invocation.
     *
     * <p>Acquires the lock if it is available and returns immediately
     * with the value {@code true}.
     * If the lock is not available then this method will return
     * immediately with the value {@code false}.
     *
     * <p>A typical usage idiom for this method would be:
     *  <pre> {@code
     * Lock lock = ...;
     * if (lock.tryLock()) {
     *   try {
     *     // manipulate protected state
     *   } finally {
     *     lock.unlock();
     *   }
     * } else {
     *   // perform alternative actions
     * }}</pre>
     *
     * This usage ensures that the lock is unlocked if it was acquired, and
     * doesn't try to unlock if the lock was not acquired.
     *
     * @return {@code true} if the lock was acquired and
     *         {@code false} otherwise
     */
    boolean tryLock();
{code}

> We shouldn't wait for readlock in doMiniBatchMutation in case of deadlock
> -------------------------------------------------------------------------
>
>                 Key: HBASE-18233
>                 URL: https://issues.apache.org/jira/browse/HBASE-18233
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.2.7
>            Reporter: Allan Yang
>            Assignee: Allan Yang
>         Attachments: HBASE-18233-branch-1.2.patch
>
>
> Please refer to the discuss in HBASE-18144
> https://issues.apache.org/jira/browse/HBASE-18144?focusedCommentId=16051701&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16051701



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message