Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
This bug can be reappeared by replaying the test case IoTDBMetadataFetchIT.showCountDevices and IoTDBMetadataFetchIT.showCountNodes.
The root causes are:
1. In nodes count implemented in ClusterPlanExecutor, if there's a SG root.a.b, and a query COUNT NODE root LEVEL=1, we should return 1 immediately instead of sending to the SG leader, which returns 0.
In a word, for any LEVEL value being less than a storage group path nodes length, we can get the result without sending to other nodes to query.
2.In devices count implemented in ClusterPlanExecutor, the query path should be set properly if it should be transmitted to other nodes.
e.g. If we have a SG root.a.b.c and a query COUNT DEVICE root.a.b, we should pass root.a.b.c to other nodes as it's the actual storage group name, not root.a.b
if we have a SG root.a and a query COUNT DEVICE root.a.b, we should pass root.a.b to other nodes as it's the actual path we queried.
In a word, at least one SG should be the prefix path of the one passed to other nodes.
Attachments
Attachments
Issue Links
- is cloned by
-
IOTDB-2134 Incorrect count result of nodes in cluster
- Closed
- links to