GitHub user nickwallen opened a pull request:

    https://github.com/apache/metron/pull/1194

    METRON-1775 Transient exception could prevent expired profiles from being 
flushed

    In the Storm Profiler, the ProfileBuilderBolt uses a separate thread to 
flush expired profiles.  Expired profiles are those that have not received a 
message for an extended period of time.  That period of time is called the 
profile time-to-live (profiler.ttl).  This is done to avoid potential memory 
leaks.
    
    This separate thread is scheduled using 
`java.util.concurrent.ScheduledExecutorService#scheduleAtFixedRate`.  The 
documentation for `scheduleAtFixedRate` says that if an exception is thrown, 
subsequent executions will be suppressed.  We do not want this to happen.  If 
an exception occurs, we need to log it and continue, ensuring that expired 
profiles will continue to flush.
    
    I have no direct proof that this has caused a problem, but it certainly is 
a potential issue that should be addressed.
    
    ## Testing
    
    There is not an easy way to manually trigger this in a development 
environment.  I have added a unit test to exercise the problem.
    
    ## Pull Request Checklist
    
    - [ ] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
    - [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    - [ ] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
    - [ ] Have you included steps or a guide to how the change may be verified 
and tested manually?
    - [ ] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
    - [ ] Have you written or updated unit tests and or integration tests to 
verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [ ] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?


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

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

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

    https://github.com/apache/metron/pull/1194.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 #1194
    
----
commit cbd6b216044ad9a274389f6ba06940a8f1cf305d
Author: Nick Allen <nick@...>
Date:   2018-09-12T16:35:52Z

    METRON-1775 Transient exception could prevent expired profiles from being 
flushed

commit af5f7b5c27421b19788ba232779c70e08c2c00f8
Author: Nick Allen <nick@...>
Date:   2018-09-12T17:08:19Z

    Added test case

commit 9764429332c42fd846c05cde58a6a6389e2706e7
Author: Nick Allen <nick@...>
Date:   2018-09-12T17:10:56Z

    Simplifying the test case

----


---

Reply via email to