Skip to content

Conversation

shuwenwei
Copy link
Member

Description

Add 'show available urls'

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 2.56410% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.65%. Comparing base (d6c2719) to head (80994d9).

Files with missing lines Patch % Lines
...ecution/config/metadata/ShowAvailableUrlsTask.java 0.00% 20 Missing ⚠️
...n/java/org/apache/iotdb/session/NodesSupplier.java 0.00% 15 Missing ⚠️
...ion/config/executor/ClusterConfigTaskExecutor.java 0.00% 14 Missing ⚠️
...ine/plan/relational/sql/ast/ShowAvailableUrls.java 0.00% 9 Missing ⚠️
...statement/metadata/ShowAvailableUrlsStatement.java 0.00% 5 Missing ⚠️
.../plan/execution/config/TableConfigTaskVisitor.java 0.00% 4 Missing ⚠️
...an/relational/security/TreeAccessCheckVisitor.java 0.00% 3 Missing ⚠️
...ueryengine/common/header/DatasetHeaderFactory.java 0.00% 1 Missing ⚠️
...e/plan/execution/config/TreeConfigTaskVisitor.java 0.00% 1 Missing ⚠️
...e/iotdb/db/queryengine/plan/parser/ASTVisitor.java 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #16441   +/-   ##
=========================================
  Coverage     38.65%   38.65%           
  Complexity      207      207           
=========================================
  Files          4936     4939    +3     
  Lines        326722   326787   +65     
  Branches      41471    41476    +5     
=========================================
+ Hits         126279   126310   +31     
- Misses       200443   200477   +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 466 to 467
new ColumnHeader(NODE_ID, TSDataType.INT32),
new ColumnHeader(STATUS, TSDataType.TEXT),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to expose these two columns to users, they only need to know ip and port is enough.

@Override
public TSStatus visitShowAvailableUrls(
ShowAvailableUrlsStatement showAvailableUrlsStatement, TreeAccessCheckContext context) {
return SUCCEED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to add recordObjectAuthenticationAuditLog for these operation even if they require no privilege. Auth in audit log for such operations can be null.

while (iterator.next()) {
String ip = iterator.getString(IP_COLUMN_NAME);
// ignore 0.0.0.0 and removing DN
if (!REMOVING_STATUS.equals(iterator.getString(STATUS_COLUMN_NAME))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter removing DN in server implement

.collect(Collectors.toList());
TsBlockBuilder builder = new TsBlockBuilder(outputDataTypes);
if (showDataNodesResp.getDataNodesInfoList() != null) {
for (TDataNodeInfo dataNodeInfo : showDataNodesResp.getDataNodesInfoList()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter removing DN here

Comment on lines 235 to 238
try (SessionDataSet sessionDataSet =
client.executeQueryStatement(SHOW_DATA_NODES_COMMAND, TIMEOUT_IN_MS, FETCH_SIZE)) {
updateAvailableNodes(sessionDataSet);
} catch (Exception e2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to do this compatibility

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.5% Duplication on New Code (required ≤ 5%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants