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/04/01 04:06:49 UTC

[GitHub] [shardingsphere] soulasuna opened a new pull request #16530: Internalize lock context into instance context

soulasuna opened a new pull request #16530:
URL: https://github.com/apache/shardingsphere/pull/16530


   ## Internalize lock context into instance context
   
   Related to #16269.
   
   Changes proposed in this pull request:
   -  Internalize lock context into instance context.
   
   


-- 
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] soulasuna commented on a change in pull request #16530: Internalize lock context into instance context

Posted by GitBox <gi...@apache.org>.
soulasuna commented on a change in pull request #16530:
URL: https://github.com/apache/shardingsphere/pull/16530#discussion_r840243485



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/instance/InstanceContext.java
##########
@@ -42,12 +43,15 @@
     
     private final ModeConfiguration modeConfiguration;
     
+    private final LockContext lockContext;
+    
     private final Collection<ComputeNodeInstance> computeNodeInstances = new LinkedList<>();
     
-    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration) {
+    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration, final LockContext lockContext) {

Review comment:
       OK

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/instance/InstanceContext.java
##########
@@ -42,12 +43,15 @@
     
     private final ModeConfiguration modeConfiguration;
     
+    private final LockContext lockContext;
+    
     private final Collection<ComputeNodeInstance> computeNodeInstances = new LinkedList<>();
     
-    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration) {
+    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration, final LockContext lockContext) {

Review comment:
       OK




-- 
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] codecov-commenter commented on pull request #16530: Internalize lock context into instance context

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #16530:
URL: https://github.com/apache/shardingsphere/pull/16530#issuecomment-1085432675


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16530](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0295bad) into [master](https://codecov.io/gh/apache/shardingsphere/commit/fe837b2107483545c44a53ddda007d410f5a290c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fe837b2) will **increase** coverage by `0.02%`.
   > The diff coverage is `36.17%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #16530      +/-   ##
   ============================================
   + Coverage     60.73%   60.75%   +0.02%     
     Complexity     2092     2092              
   ============================================
     Files          3345     3345              
     Lines         50616    50620       +4     
     Branches       8679     8681       +2     
   ============================================
   + Hits          30741    30754      +13     
   + Misses        17307    17297      -10     
   - Partials       2568     2569       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...he/shardingsphere/mode/manager/ContextManager.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWFuYWdlci9Db250ZXh0TWFuYWdlci5qYXZh) | `69.31% <ø> (-0.12%)` | :arrow_down: |
   | [...uture/lock/ShardingSphereDistributeGlobalLock.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9mdXR1cmUvbG9jay9TaGFyZGluZ1NwaGVyZURpc3RyaWJ1dGVHbG9iYWxMb2NrLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...de/manager/memory/MemoryContextManagerBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtbWVtb3J5LW1vZGUvc2hhcmRpbmdzcGhlcmUtbWVtb3J5LW1vZGUtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvbW9kZS9tYW5hZ2VyL21lbW9yeS9NZW1vcnlDb250ZXh0TWFuYWdlckJ1aWxkZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...re/mode/manager/memory/lock/MemoryLockContext.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtbWVtb3J5LW1vZGUvc2hhcmRpbmdzcGhlcmUtbWVtb3J5LW1vZGUtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvbW9kZS9tYW5hZ2VyL21lbW9yeS9sb2NrL01lbW9yeUxvY2tDb250ZXh0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...manager/standalone/lock/StandaloneLockContext.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtc3RhbmRhbG9uZS1tb2RlL3NoYXJkaW5nc3BoZXJlLXN0YW5kYWxvbmUtbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvc3RhbmRhbG9uZS9sb2NrL1N0YW5kYWxvbmVMb2NrQ29udGV4dC5qYXZh) | `10.00% <0.00%> (-0.53%)` | :arrow_down: |
   | [...end/communication/DatabaseCommunicationEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL0RhdGFiYXNlQ29tbXVuaWNhdGlvbkVuZ2luZS5qYXZh) | `25.35% <0.00%> (-0.74%)` | :arrow_down: |
   | [...coordinator/future/lock/DistributeLockContext.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9mdXR1cmUvbG9jay9EaXN0cmlidXRlTG9ja0NvbnRleHQuamF2YQ==) | `12.12% <30.76%> (-1.12%)` | :arrow_down: |
   | [...end/text/distsql/DistSQLBackendHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvRGlzdFNRTEJhY2tlbmRIYW5kbGVyRmFjdG9yeS5qYXZh) | `29.41% <33.33%> (-3.93%)` | :arrow_down: |
   | [...shardingsphere/infra/instance/InstanceContext.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9pbnN0YW5jZS9JbnN0YW5jZUNvbnRleHQuamF2YQ==) | `47.50% <100.00%> (+1.34%)` | :arrow_up: |
   | [.../manager/cluster/ClusterContextManagerBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9DbHVzdGVyQ29udGV4dE1hbmFnZXJCdWlsZGVyLmphdmE=) | `62.65% <100.00%> (ø)` | |
   | ... and [5 more](https://codecov.io/gh/apache/shardingsphere/pull/16530/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fe837b2...0295bad](https://codecov.io/gh/apache/shardingsphere/pull/16530?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] sandynz merged pull request #16530: Internalize lock context into instance context

Posted by GitBox <gi...@apache.org>.
sandynz merged pull request #16530:
URL: https://github.com/apache/shardingsphere/pull/16530


   


-- 
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] TeslaCN commented on a change in pull request #16530: Internalize lock context into instance context

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on a change in pull request #16530:
URL: https://github.com/apache/shardingsphere/pull/16530#discussion_r840232764



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/instance/InstanceContext.java
##########
@@ -42,12 +43,15 @@
     
     private final ModeConfiguration modeConfiguration;
     
+    private final LockContext lockContext;
+    
     private final Collection<ComputeNodeInstance> computeNodeInstances = new LinkedList<>();
     
-    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration) {
+    public InstanceContext(final ComputeNodeInstance instance, final WorkerIdGenerator workerIdGenerator, final ModeConfiguration modeConfiguration, final LockContext lockContext) {

Review comment:
       Could we replace this with `@RequiredArgsConstructor`?




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