Re: [PR] [IOTDB-6259][RatisConsensus] Fix missing prefix in gauge metrics [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum merged PR #11677:
URL: https://github.com/apache/iotdb/pull/11677


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Pipe: avoid useless pipe meta sync (stopped status) to DN [iotdb]

2023-12-07 Thread via GitHub


SteveYurongSu merged PR #11641:
URL: https://github.com/apache/iotdb/pull/11641


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] V1.2 fix bug of load TsFile [iotdb-docs]

2023-12-07 Thread via GitHub


wanghui42 opened a new pull request, #129:
URL: https://github.com/apache/iotdb-docs/pull/129

   (no comment)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Pipe: avoid useless pipe meta sync (stopped status) to DN [iotdb]

2023-12-07 Thread via GitHub


VGalaxies commented on code in PR #11641:
URL: https://github.com/apache/iotdb/pull/11641#discussion_r1419936716


##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/task/PipeTaskCoordinator.java:
##
@@ -118,11 +120,18 @@ public TSStatus startPipe(String pipeName) {
   public TSStatus stopPipe(String pipeName) {
 final boolean isStoppedByRuntimeException = 
pipeTaskInfo.isStoppedByRuntimeException(pipeName);
 final TSStatus status = 
configManager.getProcedureManager().stopPipe(pipeName);
-if (status == RpcUtils.SUCCESS_STATUS && isStoppedByRuntimeException) {
-  LOGGER.info(
-  "Pipe {} has stopped successfully manually, stop its auto restart 
process.", pipeName);
-  pipeTaskInfo.setIsStoppedByRuntimeExceptionToFalse(pipeName);
-  configManager.getProcedureManager().pipeHandleMetaChange(true, true);
+if (status == RpcUtils.SUCCESS_STATUS) {
+  if (isStoppedByRuntimeException) {

Review Comment:
   No need, if modified in this way, the logic under this branch becomes 
meaningless 
   



##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/task/PipeTaskCoordinator.java:
##
@@ -118,11 +120,18 @@ public TSStatus startPipe(String pipeName) {
   public TSStatus stopPipe(String pipeName) {
 final boolean isStoppedByRuntimeException = 
pipeTaskInfo.isStoppedByRuntimeException(pipeName);
 final TSStatus status = 
configManager.getProcedureManager().stopPipe(pipeName);
-if (status == RpcUtils.SUCCESS_STATUS && isStoppedByRuntimeException) {
-  LOGGER.info(
-  "Pipe {} has stopped successfully manually, stop its auto restart 
process.", pipeName);
-  pipeTaskInfo.setIsStoppedByRuntimeExceptionToFalse(pipeName);
-  configManager.getProcedureManager().pipeHandleMetaChange(true, true);
+if (status == RpcUtils.SUCCESS_STATUS) {
+  if (isStoppedByRuntimeException) {

Review Comment:
   No need, if modified in this way, the logic under this branch becomes 
meaningless 
   



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1846591729

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] [Bug] 1.2.2版本SQL 命令行终端 (CLI)参数不生效 [iotdb]

2023-12-07 Thread via GitHub


bigdata-spec closed issue #11657: [Bug] 1.2.2版本SQL 命令行终端 (CLI)参数不生效
URL: https://github.com/apache/iotdb/issues/11657


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] [Bug] 1.2.2版本SQL 命令行终端 (CLI)参数不生效 [iotdb]

2023-12-07 Thread via GitHub


bigdata-spec commented on issue #11657:
URL: https://github.com/apache/iotdb/issues/11657#issuecomment-1846601594

   > #11039 这个参数在 1.2.2 里被移除了,因为如果设置的过大,CLI有OOM的风险 文档上的描述确实需要修改一下
   
   非常感谢回答。


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Pipe: RPC datastructures for schema pipe [iotdb]

2023-12-07 Thread via GitHub


DanielWang2035 opened a new pull request, #11680:
URL: https://github.com/apache/iotdb/pull/11680

   (no comment)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [RatisConsensus] Retry Read Requests on StatusRuntimeException [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum merged PR #11679:
URL: https://github.com/apache/iotdb/pull/11679


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] [RatisConsensus] Retry Read Requests on StatusRuntimeException [iotdb]

2023-12-07 Thread via GitHub


SzyWilliam opened a new pull request, #11679:
URL: https://github.com/apache/iotdb/pull/11679

   StatusRuntimeException will be thrown if the leader is offline (gRPC 
cannotconnect to the peer)
   We can still retry in case it's a temporary network partition.


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum merged PR #11572:
URL: https://github.com/apache/iotdb/pull/11572


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix reconnect bug for JDBC [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11675:
URL: https://github.com/apache/iotdb/pull/11675#issuecomment-1846442424

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11675)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_duplicated_lines_density=list)
   
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix reconnect bug for JDBC [iotdb]

2023-12-07 Thread via GitHub


codecov-commenter commented on PR #11675:
URL: https://github.com/apache/iotdb/pull/11675#issuecomment-1846466458

   ## 
[Codecov](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: `7 lines` in your changes are missing coverage. Please review.
   > Comparison is base 
[(`5e89a90`)](https://app.codecov.io/gh/apache/iotdb/commit/5e89a90ece5ec376edc08b74f3b1c7ea5cb1f429?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.05% compared to head 
[(`fecaced`)](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.00%.
   > Report is 3 commits behind head on master.
   
   | 
[Files](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...ain/java/org/apache/iotdb/jdbc/IoTDBStatement.java](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY2xpZW50L2pkYmMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL2pkYmMvSW9UREJTdGF0ZW1lbnQuamF2YQ==)
 | 0.00% | [6 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...rc/main/java/org/apache/iotdb/cli/AbstractCli.java](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY2xpZW50L2NsaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvY2xpL0Fic3RyYWN0Q2xpLmphdmE=)
 | 0.00% | [1 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ## master   #11675  +/-   ##
   
   - Coverage 49.05%   49.00%   -0.05% 
   - Complexity2492224935  +13 
   
 Files  2808 2816   +8 
 Lines176495   176745 +250 
 Branches  2116821187  +19 
   
   + Hits  8658486621  +37 
   - Misses8991190124 +213 
   ```
   
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/iotdb/pull/11675?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Pipe: avoid useless pipe meta sync (stopped status) to DN [iotdb]

2023-12-07 Thread via GitHub


SteveYurongSu commented on code in PR #11641:
URL: https://github.com/apache/iotdb/pull/11641#discussion_r1419924550


##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/task/PipeTaskCoordinator.java:
##
@@ -118,11 +120,18 @@ public TSStatus startPipe(String pipeName) {
   public TSStatus stopPipe(String pipeName) {
 final boolean isStoppedByRuntimeException = 
pipeTaskInfo.isStoppedByRuntimeException(pipeName);
 final TSStatus status = 
configManager.getProcedureManager().stopPipe(pipeName);
-if (status == RpcUtils.SUCCESS_STATUS && isStoppedByRuntimeException) {
-  LOGGER.info(
-  "Pipe {} has stopped successfully manually, stop its auto restart 
process.", pipeName);
-  pipeTaskInfo.setIsStoppedByRuntimeExceptionToFalse(pipeName);
-  configManager.getProcedureManager().pipeHandleMetaChange(true, true);
+if (status == RpcUtils.SUCCESS_STATUS) {
+  if (isStoppedByRuntimeException) {

Review Comment:
   ```suggestion
 if (!isStoppedByRuntimeException) {
   ```



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] update iotdb-deploy doc [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #72:
URL: https://github.com/apache/iotdb-docs/pull/72


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Rest configuration is adjusted from iotdb-common.properties to iotdb-datanode.properties [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #115:
URL: https://github.com/apache/iotdb-docs/pull/115


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SeriesScanUtil support predicate pushdown [iotdb]

2023-12-07 Thread via GitHub


codecov-commenter commented on PR #11671:
URL: https://github.com/apache/iotdb/pull/11671#issuecomment-1846499271

   ## 
[Codecov](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: `90 lines` in your changes are missing coverage. Please review.
   > Comparison is base 
[(`dcaedd3`)](https://app.codecov.io/gh/apache/iotdb/commit/dcaedd336e381195dc3793065b44da06e37a515b?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.02% compared to head 
[(`401b10a`)](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.02%.
   > Report is 5 commits behind head on master.
   
   | 
[Files](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...gine/execution/operator/source/SeriesScanUtil.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcXVlcnllbmdpbmUvZXhlY3V0aW9uL29wZXJhdG9yL3NvdXJjZS9TZXJpZXNTY2FuVXRpbC5qYXZh)
 | 80.18% | [22 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...ache/iotdb/tsfile/read/reader/page/PageReader.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS90c2ZpbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3RzZmlsZS9yZWFkL3JlYWRlci9wYWdlL1BhZ2VSZWFkZXIuamF2YQ==)
 | 82.53% | [22 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...tdb/tsfile/read/reader/page/AlignedPageReader.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS90c2ZpbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3RzZmlsZS9yZWFkL3JlYWRlci9wYWdlL0FsaWduZWRQYWdlUmVhZGVyLmphdmE=)
 | 42.85% | [16 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...geengine/dataregion/utils/TsFileResourceUtils.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL3V0aWxzL1RzRmlsZVJlc291cmNlVXRpbHMuamF2YQ==)
 | 56.00% | [11 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[.../chunk/metadata/MemAlignedChunkMetadataLoader.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL3JlYWQvcmVhZGVyL2NodW5rL21ldGFkYXRhL01lbUFsaWduZWRDaHVua01ldGFkYXRhTG9hZGVyLmphdmE=)
 | 0.00% | [4 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...otdb/tsfile/read/filter/factory/FilterFactory.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS90c2ZpbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3RzZmlsZS9yZWFkL2ZpbHRlci9mYWN0b3J5L0ZpbHRlckZhY3RvcnkuamF2YQ==)
 | 69.23% | [4 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...e/dataregion/read/reader/chunk/MemChunkReader.java](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL3JlYWQvcmVhZGVyL2NodW5rL01lbUNodW5rUmVhZGVyLmphdmE=)
 | 50.00% | [3 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11671?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 

Re: [PR] [IOTDB-6263] Enhance IoTDBPartitionCreationIT [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum merged PR #11676:
URL: https://github.com/apache/iotdb/pull/11676


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SeriesScanUtil support predicate pushdown [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11671:
URL: https://github.com/apache/iotdb/pull/11671#issuecomment-1846513117

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11671)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
  
   
[![1.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'1.2%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
 [1.2% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix reconnect bug for JDBC [iotdb]

2023-12-07 Thread via GitHub


JackieTien97 merged PR #11675:
URL: https://github.com/apache/iotdb/pull/11675


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SeriesScanUtil support predicate pushdown [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11671:
URL: https://github.com/apache/iotdb/pull/11671#issuecomment-1846478411

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11671)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 [11 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
  
   
[![1.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'1.3%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
 [1.3% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Rest service code optimization and fixed insertRecords error prompt returning null issue [iotdb]

2023-12-07 Thread via GitHub


CloudWise-Lukemiao opened a new pull request, #11678:
URL: https://github.com/apache/iotdb/pull/11678

   Rest is compatible with previous version configurations and fixed 
insertRecords error prompt returning null issue and rest v1 remove insertRecords


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] SeriesScanUtil support predicate pushdown [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11671:
URL: https://github.com/apache/iotdb/pull/11671#issuecomment-1844862239

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11671)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 [11 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
  
   
[![0.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.7%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
 [0.7% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] fix error path [iotdb-docs]

2023-12-07 Thread via GitHub


l2280212 opened a new pull request, #128:
URL: https://github.com/apache/iotdb-docs/pull/128

   The MQTT configurations have been moved to iotdb-common.properties.


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] update rest insertRecords doc [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #124:
URL: https://github.com/apache/iotdb-docs/pull/124


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum commented on code in PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418307084


##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java:
##
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.manager.load.balancer.region;
+
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Allocate Region through Greedy and CopySet Algorithm. */
+public class GreedyCopySetRegionGroupAllocator implements 
IRegionGroupAllocator {
+
+  int replicationFactor;
+  // RegionGroup allocation BitSet
+  private List allocatedBitSets;
+  // Map
+  private Map regionCounter;
+  // Available DataNodeIds
+  private Integer[] dataNodeIds;
+
+  // First Key: the sum of Regions at the DataNodes in the allocation result 
is minimal
+  int optimalRegionSum;
+  // Second Key: the sum of intersected Regions with other allocated 
RegionGroups is minimal
+  int optimalIntersectionSum;
+  List optimalReplicaSets;
+
+  public GreedyCopySetRegionGroupAllocator() {
+// Empty constructor
+  }
+
+  @Override
+  public TRegionReplicaSet generateOptimalRegionReplicasDistribution(
+  Map availableDataNodeMap,
+  Map freeDiskSpaceMap,
+  List allocatedRegionGroups,
+  int replicationFactor,
+  TConsensusGroupId consensusGroupId) {
+
+prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups);
+dfs(-1, 0, new Integer[replicationFactor], 0, 0);
+
+// Randomly pick one optimal plan as result
+Collections.shuffle(optimalReplicaSets);
+Integer[] optimalReplicaSet = optimalReplicaSets.get(0);
+TRegionReplicaSet result = new TRegionReplicaSet();
+result.setRegionId(consensusGroupId);
+for (int i = 0; i < replicationFactor; i++) {
+  
result.addToDataNodeLocations(availableDataNodeMap.get(optimalReplicaSet[i]).getLocation());
+}
+return result;
+  }
+
+  /**
+   * Prepare some statistics before dfs.
+   *
+   * @param replicationFactor replication factor in the cluster
+   * @param availableDataNodeMap currently available DataNodes, ensure size() 
>= replicationFactor
+   * @param allocatedRegionGroups already allocated RegionGroups in the cluster
+   */
+  private void prepare(
+  int replicationFactor,
+  Map availableDataNodeMap,
+  List allocatedRegionGroups) {
+
+this.replicationFactor = replicationFactor;
+int maxDataNodeId = 
availableDataNodeMap.keySet().stream().max(Integer::compareTo).orElse(0);
+for (TRegionReplicaSet regionReplicaSet : allocatedRegionGroups) {
+  for (TDataNodeLocation dataNodeLocation : 
regionReplicaSet.getDataNodeLocations()) {
+// Store the maximum DataNodeId in this algorithm loop
+maxDataNodeId = Math.max(maxDataNodeId, 
dataNodeLocation.getDataNodeId());
+  }
+}
+
+// Convert the allocatedRegionGroups into allocatedBitSets,
+// where a true in BitSet corresponding to a DataNodeId in the RegionGroup
+allocatedBitSets = new ArrayList<>();

Review Comment:
   allocatedRegionGroups.size()



##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java:
##
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  

Re: [PR] SeriesScanUtil support predicate pushdown [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11671:
URL: https://github.com/apache/iotdb/pull/11671#issuecomment-1845015122

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11671)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11671=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
 [15 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11671=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_coverage=list)
  
   
[![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'1.4%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
 [1.4% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11671=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Optimize the efficiency of map-related code in IRegionGroupAllocator [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11673:
URL: https://github.com/apache/iotdb/pull/11673#issuecomment-1845024127

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11673)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11673=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11673=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11673=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11673=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11673=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11673=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11673=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11673=new_duplicated_lines_density=list)
   
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Optimize the efficiency of map-related code in IRegionGroupAllocator [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum opened a new pull request, #11673:
URL: https://github.com/apache/iotdb/pull/11673

   (no comment)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Optimize the efficiency of map-related code in IRegionGroupAllocator [iotdb]

2023-12-07 Thread via GitHub


codecov-commenter commented on PR #11673:
URL: https://github.com/apache/iotdb/pull/11673#issuecomment-1845082809

   ## 
[Codecov](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: `5 lines` in your changes are missing coverage. Please review.
   > Comparison is base 
[(`2edc91d`)](https://app.codecov.io/gh/apache/iotdb/commit/2edc91d287f72f71596b1b5f2964553527a4054c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.05% compared to head 
[(`879dd8f`)](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 49.06%.
   > Report is 6 commits behind head on master.
   
   | 
[Files](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...nfignode/manager/load/balancer/RegionBalancer.java](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9jb25maWdub2RlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9jb25maWdub2RlL21hbmFnZXIvbG9hZC9iYWxhbmNlci9SZWdpb25CYWxhbmNlci5qYXZh)
 | 0.00% | [3 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...d/balancer/region/CopySetRegionGroupAllocator.java](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-aW90ZGItY29yZS9jb25maWdub2RlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9jb25maWdub2RlL21hbmFnZXIvbG9hZC9iYWxhbmNlci9yZWdpb24vQ29weVNldFJlZ2lvbkdyb3VwQWxsb2NhdG9yLmphdmE=)
 | 0.00% | [2 Missing :warning: 
](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@Coverage Diff@@
   ## master   #11673   +/-   ##
   =
 Coverage 49.05%   49.06%   
   + Complexity2494324922   -21 
   =
 Files  2814 2808-6 
 Lines176443   176492   +49 
 Branches  2118521168   -17 
   =
   + Hits  8655186587   +36 
   - Misses8989289905   +13 
   ```
   
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/iotdb/pull/11673?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Pipe Schema: Added pipe enrich planNode logic to enable pipe request detection in order to configure "forwarding-pipe-request" in pipe SQL. [iotdb]

2023-12-07 Thread via GitHub


Caideyipi opened a new pull request, #11672:
URL: https://github.com/apache/iotdb/pull/11672

   ## Description
   As the title said.
   
   
   
   
   
   
   
   
   
   
   
   
   This PR has:
   - [ ] been self-reviewed.
   - [ ] concurrent read
   - [ ] concurrent write
   - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious 
 for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold 
 for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   
   
   
   
   # Key changed/added classes (or packages if there are too many classes) 
in this PR
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6263] Enhance IoTDBPartitionCreationIT [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11676:
URL: https://github.com/apache/iotdb/pull/11676#issuecomment-1845439618

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11676)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11676=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11676=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11676=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11676=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_iotdb=11676=coverage=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_iotdb=11676=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6218] Rename storage_query_schema_consensus_free_memory_proportion to datanode_memory_proportion [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #114:
URL: https://github.com/apache/iotdb-docs/pull/114


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6174] Support ColumnInjectOperator for '__endTime' output [iotdb]

2023-12-07 Thread via GitHub


JackieTien97 merged PR #11668:
URL: https://github.com/apache/iotdb/pull/11668


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


CRZbulabula commented on code in PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901924


##
iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocatorTest.java:
##
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.manager.load.balancer.region;
+
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class GreedyCopySetRegionGroupAllocatorTest {
+
+  private static final Logger LOGGER =
+  LoggerFactory.getLogger(GreedyCopySetRegionGroupAllocatorTest.class);
+
+  private static final GreedyRegionGroupAllocator GREEDY_ALLOCATOR =
+  new GreedyRegionGroupAllocator();
+  private static final GreedyCopySetRegionGroupAllocator 
GREEDY_COPY_SET_ALLOCATOR =
+  new GreedyCopySetRegionGroupAllocator();
+
+  private static final int TEST_DATA_NODE_NUM = 21;
+  private static final int DATA_REGION_PER_DATA_NODE =
+  (int) 
ConfigNodeDescriptor.getInstance().getConf().getDataRegionPerDataNode();
+  private static final Map 
AVAILABLE_DATA_NODE_MAP =
+  new HashMap<>();
+  private static final Map FREE_SPACE_MAP = new HashMap<>();
+
+  @BeforeClass
+  public static void setUp() {
+// Construct 21 DataNodes
+Random random = new Random();
+for (int i = 1; i <= TEST_DATA_NODE_NUM; i++) {
+  AVAILABLE_DATA_NODE_MAP.put(
+  i, new TDataNodeConfiguration().setLocation(new 
TDataNodeLocation().setDataNodeId(i)));
+  FREE_SPACE_MAP.put(i, random.nextDouble());
+}
+  }
+
+  @Test
+  public void test2Factor() {
+testRegionDistributionAndScatterWidth(2);
+  }
+
+  @Test
+  public void test3Factor() {
+testRegionDistributionAndScatterWidth(3);
+  }
+
+  private void testRegionDistributionAndScatterWidth(int replicationFactor) {
+final int dataRegionGroupNum =
+DATA_REGION_PER_DATA_NODE * TEST_DATA_NODE_NUM / replicationFactor;
+
+/* Allocate DataRegionGroups */
+List greedyResult = new ArrayList<>();
+List greedyCopySetResult = new ArrayList<>();
+for (int index = 0; index < dataRegionGroupNum; index++) {
+  greedyResult.add(
+  GREEDY_ALLOCATOR.generateOptimalRegionReplicasDistribution(
+  AVAILABLE_DATA_NODE_MAP,
+  FREE_SPACE_MAP,
+  greedyResult,
+  replicationFactor,
+  new TConsensusGroupId(TConsensusGroupType.DataRegion, index)));
+  greedyCopySetResult.add(
+  GREEDY_COPY_SET_ALLOCATOR.generateOptimalRegionReplicasDistribution(
+  AVAILABLE_DATA_NODE_MAP,
+  FREE_SPACE_MAP,
+  greedyCopySetResult,
+  replicationFactor,
+  new TConsensusGroupId(TConsensusGroupType.DataRegion, index)));
+}
+
+/* Statistics result */
+// Map for greedy algorithm
+Map greedyRegionCounter = new HashMap<>();

Review Comment:
   Fixed



##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RegionBalancer.java:
##
@@ -147,6 +151,7 @@ private LoadManager getLoadManager() {
 
   public enum RegionGroupAllocatePolicy {
 COPY_SET,

Review Comment:
   Fixed



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:

Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


CRZbulabula commented on code in PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901172


##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java:
##
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.manager.load.balancer.region;
+
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Allocate Region through Greedy and CopySet Algorithm. */
+public class GreedyCopySetRegionGroupAllocator implements 
IRegionGroupAllocator {
+
+  int replicationFactor;
+  // RegionGroup allocation BitSet
+  private List allocatedBitSets;
+  // Map
+  private Map regionCounter;
+  // Available DataNodeIds
+  private Integer[] dataNodeIds;
+
+  // First Key: the sum of Regions at the DataNodes in the allocation result 
is minimal
+  int optimalRegionSum;
+  // Second Key: the sum of intersected Regions with other allocated 
RegionGroups is minimal
+  int optimalIntersectionSum;
+  List optimalReplicaSets;
+
+  public GreedyCopySetRegionGroupAllocator() {
+// Empty constructor
+  }
+
+  @Override
+  public TRegionReplicaSet generateOptimalRegionReplicasDistribution(
+  Map availableDataNodeMap,
+  Map freeDiskSpaceMap,
+  List allocatedRegionGroups,
+  int replicationFactor,
+  TConsensusGroupId consensusGroupId) {
+
+prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups);
+dfs(-1, 0, new Integer[replicationFactor], 0, 0);
+
+// Randomly pick one optimal plan as result
+Collections.shuffle(optimalReplicaSets);
+Integer[] optimalReplicaSet = optimalReplicaSets.get(0);
+TRegionReplicaSet result = new TRegionReplicaSet();
+result.setRegionId(consensusGroupId);
+for (int i = 0; i < replicationFactor; i++) {
+  
result.addToDataNodeLocations(availableDataNodeMap.get(optimalReplicaSet[i]).getLocation());
+}
+return result;
+  }
+
+  /**
+   * Prepare some statistics before dfs.
+   *
+   * @param replicationFactor replication factor in the cluster
+   * @param availableDataNodeMap currently available DataNodes, ensure size() 
>= replicationFactor
+   * @param allocatedRegionGroups already allocated RegionGroups in the cluster
+   */
+  private void prepare(
+  int replicationFactor,
+  Map availableDataNodeMap,
+  List allocatedRegionGroups) {
+
+this.replicationFactor = replicationFactor;
+int maxDataNodeId = 
availableDataNodeMap.keySet().stream().max(Integer::compareTo).orElse(0);
+for (TRegionReplicaSet regionReplicaSet : allocatedRegionGroups) {
+  for (TDataNodeLocation dataNodeLocation : 
regionReplicaSet.getDataNodeLocations()) {
+// Store the maximum DataNodeId in this algorithm loop
+maxDataNodeId = Math.max(maxDataNodeId, 
dataNodeLocation.getDataNodeId());
+  }
+}
+
+// Convert the allocatedRegionGroups into allocatedBitSets,
+// where a true in BitSet corresponding to a DataNodeId in the RegionGroup
+allocatedBitSets = new ArrayList<>();

Review Comment:
   Fixed



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add Telegraf IoTDB Output Plugin Usage doc [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #123:
URL: https://github.com/apache/iotdb-docs/pull/123


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] fix(authority): error break line [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #127:
URL: https://github.com/apache/iotdb-docs/pull/127


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] fix error path [iotdb-docs]

2023-12-07 Thread via GitHub


qiaojialin merged PR #128:
URL: https://github.com/apache/iotdb-docs/pull/128


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Fix reconnect bug for JDBC [iotdb]

2023-12-07 Thread via GitHub


JackieTien97 opened a new pull request, #11675:
URL: https://github.com/apache/iotdb/pull/11675

   We need to regenerate a statement id while reconnecting, otherwise we will 
get the following error msg.
   
![img_v3_025t_b8d56b2f-9fa8-4b7b-a77c-f2ea8647994g](https://github.com/apache/iotdb/assets/16079446/f8b5835b-4208-42cc-b267-a41ee45278c3)
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix reconnect bug for JDBC [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11675:
URL: https://github.com/apache/iotdb/pull/11675#issuecomment-1845215578

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11675)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11675=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_iotdb=11675=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11675=new_duplicated_lines_density=list)
   
   


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


sonarcloud[bot] commented on PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#issuecomment-1845280983

   SonarCloud Quality Gate failed.  [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_iotdb=11572)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb=11572=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_iotdb=11572=false=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb=11572=new_duplicated_lines_density=list)
   
   
   
   
![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png
 'idea') Catch issues before they fail your Quality Gate with our IDE extension 
![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png
 'sonarlint') 
[SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Rest is compatible with previous version configurations and fixes null issues with insertRecords return information [iotdb]

2023-12-07 Thread via GitHub


CloudWise-Lukemiao closed pull request #11674: Rest is compatible with previous 
version configurations and fixes null issues with insertRecords return 
information
URL: https://github.com/apache/iotdb/pull/11674


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6252] Greedy CopySet allocation algorithm [iotdb]

2023-12-07 Thread via GitHub


CRZbulabula commented on code in PR #11572:
URL: https://github.com/apache/iotdb/pull/11572#discussion_r1418901541


##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java:
##
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.manager.load.balancer.region;
+
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Allocate Region through Greedy and CopySet Algorithm. */
+public class GreedyCopySetRegionGroupAllocator implements 
IRegionGroupAllocator {
+
+  int replicationFactor;
+  // RegionGroup allocation BitSet
+  private List allocatedBitSets;
+  // Map
+  private Map regionCounter;

Review Comment:
   Fixed



##
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/region/GreedyCopySetRegionGroupAllocator.java:
##
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.manager.load.balancer.region;
+
+import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Allocate Region through Greedy and CopySet Algorithm. */
+public class GreedyCopySetRegionGroupAllocator implements 
IRegionGroupAllocator {
+
+  int replicationFactor;
+  // RegionGroup allocation BitSet
+  private List allocatedBitSets;
+  // Map
+  private Map regionCounter;
+  // Available DataNodeIds
+  private Integer[] dataNodeIds;
+
+  // First Key: the sum of Regions at the DataNodes in the allocation result 
is minimal
+  int optimalRegionSum;
+  // Second Key: the sum of intersected Regions with other allocated 
RegionGroups is minimal
+  int optimalIntersectionSum;
+  List optimalReplicaSets;
+
+  public GreedyCopySetRegionGroupAllocator() {
+// Empty constructor
+  }
+
+  @Override
+  public TRegionReplicaSet generateOptimalRegionReplicasDistribution(
+  Map availableDataNodeMap,
+  Map freeDiskSpaceMap,
+  List allocatedRegionGroups,
+  int replicationFactor,
+  TConsensusGroupId consensusGroupId) {
+
+prepare(replicationFactor, availableDataNodeMap, allocatedRegionGroups);
+dfs(-1, 0, new Integer[replicationFactor], 0, 0);
+
+// Randomly pick one optimal plan as result
+Collections.shuffle(optimalReplicaSets);
+Integer[] optimalReplicaSet = optimalReplicaSets.get(0);
+TRegionReplicaSet result = new TRegionReplicaSet();
+result.setRegionId(consensusGroupId);
+for (int i = 0; i < replicationFactor; i++) {
+  

Re: [PR] Optimize the efficiency of map-related code in IRegionGroupAllocator [iotdb]

2023-12-07 Thread via GitHub


OneSizeFitsQuorum merged PR #11673:
URL: https://github.com/apache/iotdb/pull/11673


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] [IOTDB-6259][RatisConsensus] Fix missing prefix in gauge metrics [iotdb]

2023-12-07 Thread via GitHub


SzyWilliam opened a new pull request, #11677:
URL: https://github.com/apache/iotdb/pull/11677

   The change here introduce a bug: 
https://github.com/apache/iotdb/pull/11618/files#diff-f67276fe8d5ea2d3765257390efdd8df1d8185ee70c2445dcd8689ff0901384eL165
   The prefix is missing and the metrics is not functioning.


-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [IOTDB-6259] Bump ratis version to 3.0.0 [iotdb]

2023-12-07 Thread via GitHub


SzyWilliam commented on code in PR #11618:
URL: https://github.com/apache/iotdb/pull/11618#discussion_r1419113639


##
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java:
##
@@ -161,93 +145,22 @@ public boolean remove(String name) {
   }
 
   @Override
-  public Gauge gauge(String name, MetricRegistry.MetricSupplier 
metricSupplier) {
-final String fullName = getMetricName(name);

Review Comment:
   Wrong



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org