You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "sandynz (via GitHub)" <gi...@apache.org> on 2023/03/28 12:35:23 UTC

[GitHub] [shardingsphere] sandynz opened a new pull request, #24883: Refactor PipelineContext to support JDBC mode in pipeline jobs

sandynz opened a new pull request, #24883:
URL: https://github.com/apache/shardingsphere/pull/24883

   Currently, `PipelineContext` use static fields:
   ```
   public final class PipelineContext {
       
       private static volatile ModeConfiguration modeConfig;
       
       private static volatile ContextManager contextManager;
   ```
   
   When pipeline jobs are triggered in JDBC mode via ShardingSphereDataSource (every ShardingSphereDataSource has one context manager), modeConfig and contextManager might be overwritten, and then it might cause issue.
   
   Changes proposed in this pull request:
     - Remove static modifier in PipelineContext fields.
     - Add PipelineContextKey to identify context.
     - Add PipelineContextManager to get/put/remove context manager by PipelineContextKey.
     - Update ShardingSphereDataSource to trigger callbacks (ContextManagerLifecycleListener interface and impls) on context manager initialized and destroyed, it'll update pipeline contexts map in PipelineContextManager. And also ContextManagerLifecycleListener is updated.
     - Refactor PipelineJobId and impls, PipelineJobIdUtils.
     - Refactor APIFactory/API/service layers that depend on PipelineContext. e.g. PipelineAPIFactory, AbstractPipelineJobAPIImpl, PipelineDistributedBarrier, CDCJobAPI, MigrationJobAPI, PipelineDataSourceFactory, PipelineJobWorker, etc.
     - Update invocations in high level layer.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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] azexcy merged pull request #24883: Refactor PipelineContext to support JDBC mode in pipeline jobs

Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy merged PR #24883:
URL: https://github.com/apache/shardingsphere/pull/24883


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