apache / apache/iotdb

[Bug] AlignByDeviceOrderByLimitOffsetTest could fail nondeterministically

Đang mở
#16,593 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
6.4k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
115

Mô tả

### 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!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với org.apache.iotdb.db.queryengine.plan.planner.distribution.AlignByDeviceOrderByLimitOffsetTest và các phương thức orderByDeviceTest1–4 của nó. Chạy lệnh Maven nondex được cung cấp cho orderByDeviceTest4, sau đó kiểm tra các assertion phụ thuộc vào các chỉ mục chính xác của các nút con trong logical plan. Hoàn thành khi bốn test vẫn hợp lệ qua các biến thể của planner và pass dưới nondex.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
databases, testing
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.