You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2017/04/24 08:40:04 UTC

[jira] [Created] (SLING-6786) JCR Installer Provider doesn't rescan if exception happens during scan.

Karl Pauls created SLING-6786:
---------------------------------

             Summary: JCR Installer Provider doesn't rescan if exception happens during scan.
                 Key: SLING-6786
                 URL: https://issues.apache.org/jira/browse/SLING-6786
             Project: Sling
          Issue Type: Bug
          Components: Installer
    Affects Versions: JCR Installer 3.1.24
            Reporter: Karl Pauls
            Assignee: Karl Pauls
             Fix For: JCR Installer 3.1.26


Currently, the JCR Installer Provider maintains a boolean flag needsScan which is set to true on start and when an event occurs in the JCR for a given watched folder. 

Subsequently, when a scan is requested because of that flag being true, it will set the flag to false at the beginning of the scan. In other words, the folder will not be rescanned until either the provider is restarted or something changes in the repository (indicated by an event), respectively.

This is fine, however, it ignores the fact that an exception can occur during the scan (e.g., connection is gone, etc.). If that happens, it will not finish the scan but the needsScan will already be false - hence, until something changes, the folder will not be rescanned. 

The fix seems simple. The needsScan=false should be moved form the start of the scan method to the end of it. 



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