You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/05 19:31:58 UTC

[jira] [Commented] (NIFI-3152) If Provenance Repository runs out of disk space, it may not recover even when disk space is freed up

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

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

GitHub user markap14 opened a pull request:

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

    NIFI-3152: Ensure that we always close the IndexWriter when appropria…

    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:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] 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.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] 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:
    - [ ] 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.
    
    …te in SimpleIndexManager, even if an IOException is thrown when trying to commit the IndexWriter

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

    $ git pull https://github.com/markap14/nifi NIFI-3152

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

    https://github.com/apache/nifi/pull/1300.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 #1300
    
----
commit 4dc8119a2ec1c1fb84a85b012b4497f227ea1a1c
Author: Mark Payne <ma...@hotmail.com>
Date:   2016-12-05T19:30:57Z

    NIFI-3152: Ensure that we always close the IndexWriter when appropriate in SimpleIndexManager, even if an IOException is thrown when trying to commit the IndexWriter

----


> If Provenance Repository runs out of disk space, it may not recover even when disk space is freed up
> ----------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-3152
>                 URL: https://issues.apache.org/jira/browse/NIFI-3152
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 1.1.1
>
>
> If we run out of disk space in the provenance repository, we can sometimes get into a situation where the logs show us still waiting for the repo to roll over, even after disk space is freed up. A thread dump shows that the processors are trying to force the repo to rollover. However, the rollover never completes because we can't create an IndexWriter:
> {code}
> "Provenance Repository Rollover Thread-1" Id=128 TIMED_WAITING  on null
> 	at java.lang.Thread.sleep(Native Method)
> 	at org.apache.lucene.store.Lock.obtain(Lock.java:92)
> 	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:755)
> 	at org.apache.nifi.provenance.lucene.SimpleIndexManager.borrowIndexWriter(SimpleIndexManager.java:104)
> 	- waiting on org.apache.nifi.provenance.lucene.SimpleIndexManager@22f9da45
> 	at org.apache.nifi.provenance.PersistentProvenanceRepository.mergeJournals(PersistentProvenanceRepository.java:1711)
> 	at org.apache.nifi.provenance.PersistentProvenanceRepository$8.run(PersistentProvenanceRepository.java:1311)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> 	Number of Locked Synchronizers: 1
> 	- java.util.concurrent.ThreadPoolExecutor$Worker@850f87f
> {code}
> The Index Writer is blocking on a lock, waiting to obtain a write lock for the Directory.
> Digging around, I believe the issue is that if we call SimpleIndexManager.returnIndexWriter, it will call IndexWriter.commit(). But if that throws an Exception, we don't properly close the writer. If we are running out of disk space, it is likely that we will throw an Exception on IndexWriter.commit() so this appears to be the root cause.



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