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

ASF GitHub Bot commented on METRON-601:
---------------------------------------

GitHub user nickwallen reopened a pull request:

    https://github.com/apache/incubator-metron/pull/381

    METRON-601 MockHTable Put Log is Not Thread Safe

    [METRON-601](https://issues.apache.org/jira/browse/METRON-601)
    
    The MockHTable uses an ArrayList to store a log of Puts that have been 
submitted against the MockHTable. The MockHTable, along with the put log, is 
accessed from multiple threads during the integration tests. Access to the Put 
log is not thread safe, which is likely at least one cause of 
[METRON-597](https://issues.apache.org/jira/browse/METRON-597).
    
    The Put log is used by multiple tests, but more so by the 
ProfilerIntegrationTest. This tests polls the list to block the thread until 
the expected number of Puts have been submitted. This is likely why this test 
is more impacted by this issue than others.
    
    The Put Log needs to made thread safe.  See 
`org.apache.metron.test.mock.MockHTable.putLog`.  This is the smallest change 
that I could think of that would address the issue.
    
    I have triggered this code to run in Travis CI many times without seeing a 
failure.  Prior to this the Travis CI builds would more likely fail than not.  
I have also continually run the impacted tests over many hours without 
replicating the problem.  In all fairness, on the current master branch without 
this fix, I was only able to replicate the problem once on my local machine 
(after running many hours.)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/incubator-metron METRON-601

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-metron/pull/381.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #381
    
----
commit e337033a269888055b56e85811a1c00987a09fbc
Author: Nick Allen <n...@nickallen.org>
Date:   2016-11-30T18:37:26Z

    METRON-601 MockHTable Put Log is Not Thread Safe

----


> MockHTable Put Log is Not Thread Safe
> -------------------------------------
>
>                 Key: METRON-601
>                 URL: https://issues.apache.org/jira/browse/METRON-601
>             Project: Metron
>          Issue Type: Sub-task
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> The MockHTable uses an ArrayList to store a log of Puts that have been 
> submitted against the MockHTable.  The MockHTable, along with the put log, is 
> accessed from multiple threads during the integration tests.  Access to the 
> Put log is not thread safe, which is likely at least one cause of METRON-597.
> The Put log is used by multiple tests, but more so by the 
> ProfilerIntegrationTest.  This tests polls the list to block the thread until 
> the expected number of Puts have been submitted.  This is likely why this 
> test is more impacted by this issue than others.
> The Put Log needs to made thread safe.  See 
> `org.apache.metron.test.mock.MockHTable.putLog`



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to