Skip to content

Conversation

@chihyu0917
Copy link

Description

Motivation

AlignByDeviceOrderByLimitOffsetTest occasionally failed under NonDex because four methods
orderByTimeTest1, orderByTimeTest2, orderByTimeTest3, and orderByTimeTest5 relied on fixed
child-index positions in the plan tree.
Planner variability (different data-region splits, rule ordering, parallelism, etc.) can reorder or
insert nodes (ExchangeNode, extra TopKNode, etc.), so index-based assertions were nondeterministic.

Design & Implementation

  • Searches for that node type among children (helper findRootTopK, firstTopKChild, etc.).
  • Asserts 1–3 ExchangeNodes, matching the possible number of remote fragments.
  • Accepts either SeriesAggregationScanNode or TopKNode, verifying that at least one fragment of each kind exists.
  • Walks each sub-tree and verifies type presence (via containsNodeType helper).

Reproduce the error

mvn -pl iotdb-core/datanode edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest#orderByTimeTest1

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

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.

1 participant