[Bug] AlignByDeviceOrderByLimitOffsetTest could fail nondeterministically
- 主要言語
- Java
- スター
- 6.4k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 115
説明
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
### Version
OS: Ubuntu 22.04
IoTDB: master @ d719d4651d81e978a74afe6446bee2f5582f4345
Java 17, Apache Maven 3.8.7
### Describe the bug and provide the minimal reproduce step
A group of JUnit tests under `org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest` method methods `orderByDeviceTest1`, `orderByDeviceTest2`, `orderByDeviceTest3`, and `orderByDeviceTest4`. The tests could fail nondeterministically because they asserted exact child-index positions in the logical-plan tree.
Planner variations (region splits, optimisations) sometimes insert a different node type or reorder children, triggering a test bug.
I use `nondex` to reproduce the error. Failed in nondexSeed=933178, 974622.
```
mvn -pl iotdb-core/datanode edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest#orderByDeviceTest4 -Dnondexruns=10
```
The bugs under these four methods are alike, so I only provide one of them.
```
org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest.orderByDeviceTest4 -- Time elapsed: 1.547 s <<< FAILURE!
java.lang.AssertionError
```
### What did you expect to see?
```
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.591 s -- in org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest
```
### What did you see instead?
```
[INFO] Running org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.654 s <<< FAILURE! -- in org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest
[ERROR] org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest.orderByDeviceTest4 -- Time elapsed: 1.637 s <<< FAILURE!
java.lang.AssertionError
```
### Anything else?
_No response_
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
コントリビューションガイド
調査の方向性
org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest と、そのメソッド orderByDeviceTest1–4 から始めます。orderByDeviceTest4 用に提供されている Maven nondex コマンドを実行し、その後、論理プランの子の正確なインデックスに依存しているアサーションを調査します。4 つのテストが planner のバリエーション全体で有効なまま維持され、nondex でパスすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases, testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100