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 2022/01/04 07:46:20 UTC

[GitHub] [shardingsphere-elasticjob] kaihekaihe opened a new issue #2035: Why persistation need to be redone after reconnection

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


   ## Question
   
   Why persistation need to be redone after reconnection
   
   `public void stateChanged(final CuratorFramework client, final ConnectionState newState) {
           if (JobRegistry.getInstance().isShutdown(jobName)) {
               return;
           }
           JobScheduleController jobScheduleController = JobRegistry.getInstance().getJobScheduleController(jobName);
           if (ConnectionState.SUSPENDED == newState || ConnectionState.LOST == newState) {
               jobScheduleController.pauseJob();
           } else if (ConnectionState.RECONNECTED == newState) {
               serverService.persistOnline(serverService.isEnableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp()));
               instanceService.persistOnline();
               executionService.clearRunningInfo(shardingService.getLocalShardingItems());
               jobScheduleController.resumeJob();
           }
       }`
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere-elasticjob/issues).
   - Read documentation: [ElasticJob Doc](https://shardingsphere.apache.org/elasticjob/current/en/overview/).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere-elasticjob] kaihekaihe commented on issue #2035: Why persistation need to be redone after reconnection

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


   `serverService.persistOnline(serverService.isEnableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp()));;`
   
   For instance node ,yes it is ephemeral , I know what you mean. For Server node, it is not ephemeral , why does its data need to be filled again.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #2035: Why persistation need to be redone after reconnection

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


   Hi @kaihekaihe 
   The instance service using the ephemeral node. If disconnected to registry center, ephemeral nodes may be removed, so we need to registry instance nodes once reconnected.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #2035: Why persistation need to be redone after reconnection

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


   > For instance node ,yes it is ephemeral , I know what you mean. For Server node, it is not ephemeral , why does its data need to be filled again.
   
   IMO, sometimes users may clear the servers without alive instance, persisting again can make sure the server node is present.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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