[jira] [Commented] (SLING-2398) Sling Mappings creates new threads to reload mappings

2012-02-02 Thread Felix Meschberger (Commented) (JIRA)

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

Felix Meschberger commented on SLING-2398:
--

> What about just creating a single threaded queue

I've done something along these lines, yes.

> Sling Mappings creates new threads to reload mappings
> -
>
> Key: SLING-2398
> URL: https://issues.apache.org/jira/browse/SLING-2398
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.0.10
>Reporter: Hakim Sadikali
>Assignee: Felix Meschberger
>  Labels: performance
> Attachments: MapEntries.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Whenever the /etc/map or a sling:vanityPath, sling:vanityOrder or 
> sling:redirect is modified a new thread is created to recreate the maps.  If 
> these values get modified very quickly, then its possible to create too many 
> new threads and kill the system.  A better implementation would be to check 
> to see if a thread is running and reuse that thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (SLING-2398) Sling Mappings creates new threads to reload mappings

2012-02-02 Thread Felix Meschberger (Commented) (JIRA)

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

Felix Meschberger commented on SLING-2398:
--

Updated the asynchronous handling in Rev. 1239916

A single thread is created which handles updates. On event the update is 
triggered. A lock is used to prevent concurrent updates and cleanup during 
shutdown.

> Sling Mappings creates new threads to reload mappings
> -
>
> Key: SLING-2398
> URL: https://issues.apache.org/jira/browse/SLING-2398
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.0.10
>Reporter: Hakim Sadikali
>Assignee: Felix Meschberger
>  Labels: performance
> Attachments: MapEntries.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Whenever the /etc/map or a sling:vanityPath, sling:vanityOrder or 
> sling:redirect is modified a new thread is created to recreate the maps.  If 
> these values get modified very quickly, then its possible to create too many 
> new threads and kill the system.  A better implementation would be to check 
> to see if a thread is running and reuse that thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (SLING-2398) Sling Mappings creates new threads to reload mappings

2012-02-02 Thread Justin Edelson (Commented) (JIRA)

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

Justin Edelson commented on SLING-2398:
---

What about just creating a single threaded queue with 
Executors.newSingleThreadExecutor() and then submitting tasks into that queue?

> Sling Mappings creates new threads to reload mappings
> -
>
> Key: SLING-2398
> URL: https://issues.apache.org/jira/browse/SLING-2398
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.0.10
>Reporter: Hakim Sadikali
>Assignee: Felix Meschberger
>  Labels: performance
> Attachments: MapEntries.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Whenever the /etc/map or a sling:vanityPath, sling:vanityOrder or 
> sling:redirect is modified a new thread is created to recreate the maps.  If 
> these values get modified very quickly, then its possible to create too many 
> new threads and kill the system.  A better implementation would be to check 
> to see if a thread is running and reuse that thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (SLING-2398) Sling Mappings creates new threads to reload mappings

2012-02-02 Thread Felix Meschberger (Commented) (JIRA)

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

Felix Meschberger commented on SLING-2398:
--

Thanks for reporting and providing a possible patch.

I am right now working on this issue (and also the potential concurrency of the 
init method). I am considering taking a slightly different route, though: I 
will create a thread upfront and use some signalling to the thread to kick the 
initialization method.

> Sling Mappings creates new threads to reload mappings
> -
>
> Key: SLING-2398
> URL: https://issues.apache.org/jira/browse/SLING-2398
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.0.10
>Reporter: Hakim Sadikali
>  Labels: performance
> Attachments: MapEntries.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Whenever the /etc/map or a sling:vanityPath, sling:vanityOrder or 
> sling:redirect is modified a new thread is created to recreate the maps.  If 
> these values get modified very quickly, then its possible to create too many 
> new threads and kill the system.  A better implementation would be to check 
> to see if a thread is running and reuse that thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira