Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-2025

Incorrect count result of nodes and devices in cluster

    XMLWordPrintableJSON

Details

    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

        1. image-2021-11-17-15-33-09-569.png
          34 kB
          Eric Pai
        2. image-2021-11-17-15-33-32-630.png
          27 kB
          Eric Pai
        3. image-2021-11-17-15-33-49-732.png
          14 kB
          Eric Pai
        4. image-2021-12-13-11-20-47-854.png
          52 kB
          FengQingxin

        Issue Links

          Activity

            People

              ericpai Eric Pai
              ericpai Eric Pai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: