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/08/03 12:07:43 UTC

[GitHub] [shardingsphere-elasticjob] BoulCheng opened a new pull request #1329: 修复哈希表初始容量以避免发生扩容

BoulCheng opened a new pull request #1329:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1329


   修复哈希表初始容量以避免发生扩容


----------------------------------------------------------------
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 pull request #1329: 修复哈希表初始容量以避免发生扩容

Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #1329:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1329#issuecomment-667996033


   Why not use sharding total count as initial capacity of hash map?


----------------------------------------------------------------
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 merged pull request #1329: 修复哈希表初始容量以避免发生扩容

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #1329:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1329


   


----------------------------------------------------------------
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] BoulCheng commented on pull request #1329: 修复哈希表初始容量以避免发生扩容

Posted by GitBox <gi...@apache.org>.
BoulCheng commented on pull request #1329:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1329#issuecomment-668344382


   > Why not use sharding total count as initial capacity of hash map?
   
   Because the key of the hash table is the job instance. If the shardingTotalCount is larger than the total number of job instances, space will be wasted. If the shardingTotalCount is smaller than the total number of job instances, the hash table will resize.


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