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/05/13 14:53:50 UTC
[GitHub] [shardingsphere] Ahoo-Wang opened a new pull request, #17641: Upgrade to CosId 1.10.0
Ahoo-Wang opened a new pull request, #17641:
URL: https://github.com/apache/shardingsphere/pull/17641
Changes proposed in this pull request:
- Upgrade to CosId `1.10.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] codecov-commenter commented on pull request #17641: Upgrade to CosId 1.10.0
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #17641:
URL: https://github.com/apache/shardingsphere/pull/17641#issuecomment-1126590368
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/17641?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 [#17641](https://codecov.io/gh/apache/shardingsphere/pull/17641?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a1118c8) into [master](https://codecov.io/gh/apache/shardingsphere/commit/a6c954a648d9ae182a01b44930fd068f34eaa85d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a6c954a) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #17641 +/- ##
============================================
+ Coverage 58.83% 58.87% +0.04%
+ Complexity 2126 2123 -3
============================================
Files 3590 3585 -5
Lines 53467 53395 -72
Branches 9114 9107 -7
============================================
- Hits 31458 31437 -21
+ Misses 19357 19304 -53
- Partials 2652 2654 +2
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/17641?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
| [...sphere/infra/database/type/DatabaseTypeEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9kYXRhYmFzZS90eXBlL0RhdGFiYXNlVHlwZUVuZ2luZS5qYXZh) | `50.00% <0.00%> (-11.54%)` | :arrow_down: |
| [...g/algorithm/sharding/mod/ModShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvYWxnb3JpdGhtL3NoYXJkaW5nL21vZC9Nb2RTaGFyZGluZ0FsZ29yaXRobS5qYXZh) | `88.37% <0.00%> (-6.37%)` | :arrow_down: |
| [...dinator/lock/service/MutexLockRegistryService.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9sb2NrL3NlcnZpY2UvTXV0ZXhMb2NrUmVnaXN0cnlTZXJ2aWNlLmphdmE=) | `50.00% <0.00%> (-4.55%)` | :arrow_down: |
| [...gsphere/infra/metadata/ShardingSphereMetaData.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9TaGFyZGluZ1NwaGVyZU1ldGFEYXRhLmphdmE=) | `13.33% <0.00%> (ø)` | |
| [.../infra/rewrite/engine/GenericSQLRewriteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtcmV3cml0ZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvcmV3cml0ZS9lbmdpbmUvR2VuZXJpY1NRTFJld3JpdGVFbmdpbmUuamF2YQ==) | `100.00% <0.00%> (ø)` | |
| [...ngsphere/sqltranslator/rule/SQLTranslatorRule.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXNxbC10cmFuc2xhdG9yL3NoYXJkaW5nc3BoZXJlLXNxbC10cmFuc2xhdG9yLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbHRyYW5zbGF0b3IvcnVsZS9TUUxUcmFuc2xhdG9yUnVsZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...nslator/config/SQLTranslatorRuleConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXNxbC10cmFuc2xhdG9yL3NoYXJkaW5nc3BoZXJlLXNxbC10cmFuc2xhdG9yLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsdHJhbnNsYXRvci9jb25maWcvU1FMVHJhbnNsYXRvclJ1bGVDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...obal/general/watcher/GeneralAckChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9sb2NrL2dsb2JhbC9nZW5lcmFsL3dhdGNoZXIvR2VuZXJhbEFja0NoYW5nZWRXYXRjaGVyLmphdmE=) | | |
| [...nager/cluster/coordinator/lock/InterMutexLock.java](https://codecov.io/gh/apache/shardingsphere/pull/17641/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9sb2NrL0ludGVyTXV0ZXhMb2NrLmphdmE=) | | |
| ... and [20 more](https://codecov.io/gh/apache/shardingsphere/pull/17641/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/17641?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/17641?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 [a6c954a...a1118c8](https://codecov.io/gh/apache/shardingsphere/pull/17641?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] terrymanu commented on a diff in pull request #17641: Upgrade to CosId 1.10.0
Posted by GitBox <gi...@apache.org>.
terrymanu commented on code in PR #17641:
URL: https://github.com/apache/shardingsphere/pull/17641#discussion_r872609268
##########
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-plugin/shardingsphere-sharding-cosid/src/test/java/org/apache/shardingsphere/sharding/cosid/algorithm/keygen/CosIdKeyGenerateAlgorithmTest.java:
##########
@@ -72,12 +75,14 @@ public void assertGenerateKeyWhenIdProviderIsEmpty() {
@Test
public void assertGenerateKeyAsString() {
String idName = "test-cosid-as-string";
- DefaultIdGeneratorProvider.INSTANCE.set(idName, MockIdGenerator.INSTANCE);
+ String prefix = "test_";
+ IdGenerator stringIdGen = new StringIdGenerator(new MillisecondSnowflakeId(1, 0), new PrefixIdConverter(prefix, Radix62IdConverter.INSTANCE));
+ DefaultIdGeneratorProvider.INSTANCE.set(idName, stringIdGen);
KeyGenerateAlgorithm algorithm = KeyGenerateAlgorithmFactory.newInstance(new ShardingSphereAlgorithmConfiguration("COSID", createAsStringProperties(idName)));
Comparable<?> actual = algorithm.generateKey();
assertThat(actual, instanceOf(String.class));
- assertThat(actual.toString(), startsWith("test_"));
- assertTrue(actual.toString().length() <= 16);
+ assertThat(actual.toString(), startsWith(prefix));
+ assertThat(actual.toString().length(), Matchers.lessThanOrEqualTo(16));
Review Comment:
Please use static import in `Matchers.lessThanOrEqualTo`
--
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] terrymanu merged pull request #17641: Upgrade to CosId 1.10.0
Posted by GitBox <gi...@apache.org>.
terrymanu merged PR #17641:
URL: https://github.com/apache/shardingsphere/pull/17641
--
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