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

ASF GitHub Bot commented on NIFI-3582:
--------------------------------------

GitHub user gresockj opened a pull request:

    https://github.com/apache/nifi/pull/1592

    NIFI-3582: Fixing PersistentMapCache bug that skipped persistent evictions

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit 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)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [x] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


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

    $ git pull https://github.com/gresockj/nifi NIFI-3582

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

    https://github.com/apache/nifi/pull/1592.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 #1592
    
----
commit 500bdddcb728744ee5956d1c082570996bfc531a
Author: Joe Gresock <[email protected]>
Date:   2017-03-13T16:01:37Z

    NIFI-3582: Fixing PersistentMapCache bug that skipped persistent evictions

----


> DistributedMapCacheServer does not evict persistent records
> -----------------------------------------------------------
>
>                 Key: NIFI-3582
>                 URL: https://issues.apache.org/jira/browse/NIFI-3582
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.1.1
>            Reporter: Joseph Gresock
>            Assignee: Joseph Gresock
>             Fix For: 1.2.0
>
>
> The PersistentMapCache does not appear to be evicting records when used by 
> the DistributedMapCacheServer, at least in the FIFO eviction mode.  
> To replicate this behavior in NiFi 1.1.1, add the following to your flow:
> *Services*
> * DistributedMapCacheServer, port 4557, maximum cache entries = 10,000, FIFO 
> eviction, persistence directory specified
> * DistributedMapCacheClientService, point to the same host and port
> *Flow*
> GenerateFlowFile (randomize 1K binary files in batches of 10, schedule 10 
> threads) -> HashContent (md5) into hash.value -> DetectDuplicate with 
> identifier = $\{hash.value\}, description = ., no age off, select your cache 
> client, cache identifier = true
> This should cause the snapshot file in your cache's persistence directory to 
> exceed 100,000 keys pretty quickly, and as far as I can tell, it never goes 
> back down.  
> On our production system, we have the cache server configured for 100,000 max 
> entries with FIFO eviction, and we recently saw this log statement showing 
> the writeahead log with over 4 million entries:
> {code}
> nifi-app.log:2017-03-09 15:03:00,670 INFO [Distributed Cache Server 
> Communications Thread: ac907dec-49a4-439e-99f5-1558f2358d87] 
> org.wali.MinimalLockingWriteAheadLog 
> org.wali.MinimalLockingWriteAheadLog@40569408 
> checkpointed with 4262902 Records and 0 Swap Files in 256302 milliseconds 
> (Stop-the-world time = 1378 milliseconds, Clear Edit Logs time = 19 millis), 
> max Transaction ID 4263237
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to