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/07/08 04:08:21 UTC

[GitHub] [shardingsphere] soulasuna opened a new pull request, #18951: Remove worker-id from compute node instance

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

   ## Remove worker-id from compute node instance
   
   Changes proposed in this pull request:
   - Remove worker-id from compute node instance
   - Add test
   
   


-- 
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] menghaoranss commented on a diff in pull request #18951: Remove worker-id from compute node instance

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on code in PR #18951:
URL: https://github.com/apache/shardingsphere/pull/18951#discussion_r916485871


##########
shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGenerator.java:
##########
@@ -58,7 +58,7 @@ private long reGenerate() {
             reTryCount++;
             result = generateSequentialId();
             if (result > MAX_WORKER_ID) {
-                result = result % 1024L;
+                result = result % MAX_WORKER_ID + 1;

Review Comment:
   why +1 ?



-- 
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] menghaoranss commented on pull request #18951: Remove worker-id from compute node instance

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on PR #18951:
URL: https://github.com/apache/shardingsphere/pull/18951#issuecomment-1178584938

   ci build failed.


-- 
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 diff in pull request #18951: Remove worker-id from compute node instance

Posted by GitBox <gi...@apache.org>.
soulasuna commented on code in PR #18951:
URL: https://github.com/apache/shardingsphere/pull/18951#discussion_r916495336


##########
shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGenerator.java:
##########
@@ -58,7 +58,7 @@ private long reGenerate() {
             reTryCount++;
             result = generateSequentialId();
             if (result > MAX_WORKER_ID) {
-                result = result % 1024L;
+                result = result % MAX_WORKER_ID + 1;

Review Comment:
   Because worker-id starts from 0



-- 
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] menghaoranss merged pull request #18951: Remove worker-id from compute node instance

Posted by GitBox <gi...@apache.org>.
menghaoranss merged PR #18951:
URL: https://github.com/apache/shardingsphere/pull/18951


-- 
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 #18951: Remove worker-id from compute node instance

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18951?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 [#18951](https://codecov.io/gh/apache/shardingsphere/pull/18951?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e528a31) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ac6eacb9b1d275252d5aec336e34fbcd12d07e1a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ac6eacb) will **increase** coverage by `0.01%`.
   > The diff coverage is `50.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18951      +/-   ##
   ============================================
   + Coverage     59.33%   59.34%   +0.01%     
     Complexity     2301     2301              
   ============================================
     Files          3783     3783              
     Lines         54549    54535      -14     
     Branches       9231     9226       -5     
   ============================================
   - Hits          32367    32366       -1     
   + Misses        19460    19448      -12     
   + Partials       2722     2721       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/18951?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...dingsphere/infra/instance/ComputeNodeInstance.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9pbnN0YW5jZS9Db21wdXRlTm9kZUluc3RhbmNlLmphdmE=) | `42.85% <ø> (ø)` | |
   | [.../coordinator/ClusterContextManagerCoordinator.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9DbHVzdGVyQ29udGV4dE1hbmFnZXJDb29yZGluYXRvci5qYXZh) | `80.51% <ø> (+3.01%)` | :arrow_up: |
   | [...atus/compute/service/ComputeNodeStatusService.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9zdGF0dXMvY29tcHV0ZS9zZXJ2aWNlL0NvbXB1dGVOb2RlU3RhdHVzU2VydmljZS5qYXZh) | `70.58% <ø> (+7.73%)` | :arrow_up: |
   | [...ompute/watcher/ComputeNodeStateChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9zdGF0dXMvY29tcHV0ZS93YXRjaGVyL0NvbXB1dGVOb2RlU3RhdGVDaGFuZ2VkV2F0Y2hlci5qYXZh) | `18.18% <ø> (-1.82%)` | :arrow_down: |
   | [...y/workerid/generator/ClusterWorkerIdGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS93b3JrZXJpZC9nZW5lcmF0b3IvQ2x1c3RlcldvcmtlcklkR2VuZXJhdG9yLmphdmE=) | `4.76% <0.00%> (ø)` | |
   | [...shardingsphere/infra/instance/InstanceContext.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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==) | `48.57% <100.00%> (+2.05%)` | :arrow_up: |
   | [...sphere/mode/metadata/persist/node/ComputeNode.java](https://codecov.io/gh/apache/shardingsphere/pull/18951/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvcGVyc2lzdC9ub2RlL0NvbXB1dGVOb2RlLmphdmE=) | `78.57% <0.00%> (+7.14%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18951?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/18951?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 [ac6eacb...e528a31](https://codecov.io/gh/apache/shardingsphere/pull/18951?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