4paradigm / 4paradigm/OpenMLDB

SQL Engine assumes all the pointers are valid during the computation period while it is not always true

Đang mở
#2,944 1 bình luận 0 reaction 2 người được giao Được @aceforeverd nhận Xem trên GitHub
bug high-priority
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

**Bug Description**
SQL Engine assumes all the pointers are valid during the computation period,
while it is not true in the storage engine.

For example,
for `*_cate` (see issue #2931), sql engine assumes that the `StringRef`s are valid during the whole computation, while in the `Iterator` implementation (see pr #2939), the `value` will become invalid/freed after the next call of `Next`.
- `FullTableIterator`: fixed in #2939, guarantee the `value` is valid in the whole life cycle of `Iterator`
- `RemoteWindowIterator`: as `sliding window` copies the rows, we didn't change the current behaviour for now
- For local `Iterator`, we haven't fixed it for now.

**Expected Behavior**
We have to work out a good solution between SQL engine and storage engine to make them have the same assumption.

**Relation Case**

**Steps to Reproduce**

1.
2.
3.
4.

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

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

Hướng nghiên cứu

The issue references SQL engine and storage engine pointer validity, specifically StringRef in *_cate functions. Examine the Iterator implementations (FullTableIterator, RemoteWindowIterator, local Iterator) in the storage engine. Look at the SQL engine's assumption that pointers remain valid. Start by reading the code around issue #2931 and PR #2939 to understand the context. Determine what a 'good solution' for pointer lifetime coordination between the two subsystems would entail.

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

Đánh giá

Công nghệ
sql
Lĩnh vực
backend, databases
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 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
35/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.