hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19319) Fix bug in synchronizing over ProcedureEvent
Date Mon, 27 Nov 2017 19:51:00 GMT

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

Appy commented on HBASE-19319:
------------------------------

The test TestHRegionWithInMemoryFlush extends TestHRegion which is flaky. But TestHRegionWithInMemoryFlush
itself doesn't appear in flaky list, so i ran it 10 times locally and it passed all the times.
Fixed all 3 checkstyle errors.
Committing to master and branch-2.
Thanks for the review stack.

> Fix bug in synchronizing over ProcedureEvent
> --------------------------------------------
>
>                 Key: HBASE-19319
>                 URL: https://issues.apache.org/jira/browse/HBASE-19319
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>            Assignee: Appy
>         Attachments: HBASE-19319.master.001.patch, HBASE-19319.master.002.patch
>
>
> Following synchronizes over local variable rather than the original ProcedureEvent object.
Clearly a bug since this code block won't follow exclusion with many of the synchronized methods
in ProcedureEvent class.
> {code}
>  @Override
>   public void wakeEvents(final int count, final ProcedureEvent... events) {
>     final boolean traceEnabled = LOG.isTraceEnabled();
>     schedLock();
>     try {
>       int waitingCount = 0;
>       for (int i = 0; i < count; ++i) {
>         final ProcedureEvent event = events[i];
>         synchronized (event) {
>           if (!event.isReady()) {
> {code}



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

Mime
View raw message