[jira] [Updated] (SOLR-10738) TriggerAction is initialised even if the trigger is never scheduled

2017-09-20 Thread Shalin Shekhar Mangar (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-10738:
-
Fix Version/s: (was: 7.0)
   7.1
   master (8.0)

> TriggerAction is initialised even if the trigger is never scheduled
> ---
>
> Key: SOLR-10738
> URL: https://issues.apache.org/jira/browse/SOLR-10738
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrCloud
>Reporter: Shalin Shekhar Mangar
>Assignee: Shalin Shekhar Mangar
> Fix For: master (8.0), 7.1
>
> Attachments: SOLR-10738-fix.patch, SOLR-10738.patch, 
> SOLR-10738-tests.patch
>
>
> The zk watcher responsible for creating triggers creates them blindly without 
> checking if the trigger is actually modified. This is be design as 
> ScheduledTriggers.add is a no-op if the trigger being added is unchanged. 
> However, since the trigger's actions are initialised in the trigger's 
> constructor, they are inited needlessly by the zk watcher thread even though 
> we may never schedule those trigger instances (because they are unchanged). 
> So I propose to change the TriggerAction lifecycle such that the 
> TriggerAction.init is only called when the trigger is actually ready to be 
> scheduled.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-10738) TriggerAction is initialised even if the trigger is never scheduled

2017-05-24 Thread Shalin Shekhar Mangar (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-10738:
-
Attachment: SOLR-10738-tests.patch

Added tests for proper init behavior.

> TriggerAction is initialised even if the trigger is never scheduled
> ---
>
> Key: SOLR-10738
> URL: https://issues.apache.org/jira/browse/SOLR-10738
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrCloud
>Reporter: Shalin Shekhar Mangar
>Assignee: Shalin Shekhar Mangar
> Fix For: master (7.0)
>
> Attachments: SOLR-10738-fix.patch, SOLR-10738.patch, 
> SOLR-10738-tests.patch
>
>
> The zk watcher responsible for creating triggers creates them blindly without 
> checking if the trigger is actually modified. This is be design as 
> ScheduledTriggers.add is a no-op if the trigger being added is unchanged. 
> However, since the trigger's actions are initialised in the trigger's 
> constructor, they are inited needlessly by the zk watcher thread even though 
> we may never schedule those trigger instances (because they are unchanged). 
> So I propose to change the TriggerAction lifecycle such that the 
> TriggerAction.init is only called when the trigger is actually ready to be 
> scheduled.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-10738) TriggerAction is initialised even if the trigger is never scheduled

2017-05-24 Thread Shalin Shekhar Mangar (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-10738:
-
Attachment: SOLR-10738-fix.patch

Here's a better fix which adds a init method to Trigger itself which is then 
called by ScheduledTriggers right before we schedule the trigger. I'll add a 
test for it.

> TriggerAction is initialised even if the trigger is never scheduled
> ---
>
> Key: SOLR-10738
> URL: https://issues.apache.org/jira/browse/SOLR-10738
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrCloud
>Reporter: Shalin Shekhar Mangar
>Assignee: Shalin Shekhar Mangar
> Fix For: master (7.0)
>
> Attachments: SOLR-10738-fix.patch, SOLR-10738.patch
>
>
> The zk watcher responsible for creating triggers creates them blindly without 
> checking if the trigger is actually modified. This is be design as 
> ScheduledTriggers.add is a no-op if the trigger being added is unchanged. 
> However, since the trigger's actions are initialised in the trigger's 
> constructor, they are inited needlessly by the zk watcher thread even though 
> we may never schedule those trigger instances (because they are unchanged). 
> So I propose to change the TriggerAction lifecycle such that the 
> TriggerAction.init is only called when the trigger is actually ready to be 
> scheduled.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-10738) TriggerAction is initialised even if the trigger is never scheduled

2017-05-24 Thread Shalin Shekhar Mangar (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-10738:
-
Attachment: SOLR-10738.patch

Patch with the changes.

> TriggerAction is initialised even if the trigger is never scheduled
> ---
>
> Key: SOLR-10738
> URL: https://issues.apache.org/jira/browse/SOLR-10738
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrCloud
>Reporter: Shalin Shekhar Mangar
>Assignee: Shalin Shekhar Mangar
> Fix For: master (7.0)
>
> Attachments: SOLR-10738.patch
>
>
> The zk watcher responsible for creating triggers creates them blindly without 
> checking if the trigger is actually modified. This is be design as 
> ScheduledTriggers.add is a no-op if the trigger being added is unchanged. 
> However, since the trigger's actions are initialised in the trigger's 
> constructor, they are inited needlessly by the zk watcher thread even though 
> we may never schedule those trigger instances (because they are unchanged). 
> So I propose to change the TriggerAction lifecycle such that the 
> TriggerAction.init is only called when the trigger is actually ready to be 
> scheduled.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org