You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/06 08:56:02 UTC

[GitHub] [shardingsphere-elasticjob] TeslaCN opened a new issue #1544: SPI may be inconsistent between nodes if job configuration changed

TeslaCN opened a new issue #1544:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1544


   ## Bug Report
   
   ### Which version of ElasticJob did you use?
   3.0.0-alpha
   ### Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?
   ElasticJob-Lite
   
   ### Reason analyze (If you can)
   There is no listener is listening change of jobErrorHandlerType.
   
   **Not only JobErrorHandler, the following interfaces also have this problem:**
   - JobExecutorServiceHandler
   - ElasticJobListener
   
   ### Steps to reproduce the behavior.
   1. Start a new process and schedule job 'simple' with job error handler type 'foo'.
   2. Start another new process and schedule job 'simple' with job error handler type 'bar'.
   
   ### Example codes for reproduce this issue (such as a github link).
   
   Schedule 'simple' job with 'foo' error handler.
   ```java
           new ScheduleJobBootstrap(REGISTRY_CENTER, new ErrorSimpleJob(),
                   JobConfiguration.newBuilder("simple", 3)
                           .cron("0/5 * * * * ?")
                           .shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou")
                           .jobErrorHandlerType("foo")
                           .overwrite(true)
                           .build(),
                   TRACING_CONFIGURATION)
                   .schedule();
   ```
   
   Schedule 'simple' job with 'bar' error handler.
   ```java
           new ScheduleJobBootstrap(REGISTRY_CENTER, new ErrorSimpleJob(),
                   JobConfiguration.newBuilder("simple", 3)
                           .cron("0/5 * * * * ?")
                           .shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou")
                           .jobErrorHandlerType("bar")
                           .overwrite(true)
                           .build(),
                   TRACING_CONFIGURATION)
                   .schedule();
   ```
   
   ### Expected behavior
   All instances of 'simple' job use same error handler.
   ### Actual behavior
   Node A using 'foo' error handler while Node B using 'bar' handler.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1544: SPI may be inconsistent between nodes if job configuration changed

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1544:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1544#issuecomment-704962046


   I have tried enhancing JobRegistry and refactor ElasticJobExecutor to resolve this problem, but I found that ElasticJobExecutor is used by both Lite and Cloud. The enhancement of JobRegistry is for Lite only.
   
   My second idea is introducing a concept 'reload'. We already have the operation 'resharding'. Can we introduce an operation named 'reload' to reload the job?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu commented on issue #1544: SPI may be inconsistent between nodes if job configuration changed

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #1544:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1544#issuecomment-723468000


   The first way may better. reload should be automatic when reg center's data changed


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu edited a comment on issue #1544: SPI may be inconsistent between nodes if job configuration changed

Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #1544:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1544#issuecomment-723468000


   The first way may better. 
   Reload should be automatic when reg center's data changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu closed issue #1544: SPI may be inconsistent between nodes if job configuration changed

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #1544:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1544


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org