4paradigm / 4paradigm/OpenMLDB

`CallProcedure` request may not be routed to the best tablet when `partitionnum` > 1

Đang mở
#1,604 2 bình luận 0 reaction 1 người được giao Được @zhanghaohit nhận Xem trên GitHub
enhancement
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**
When the `partitionnum` of a table is > 1, `CallProcedure` request is routed to a random tablet.

Current logic is:
`pid = rand_.Uniform(pid_num);`

The result is wrong but we may have to fetch data from remote tablet to the routed tablet.

**Expected Behavior**
`CallProcedure` request should be routed to the tablet based on the pk.

**Steps to Reproduce**

1. `SQLSDKQueryTest.RequestProcedureTest`: change create statement with `options(partitionnum=8)`
2. will generate a proxy task

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

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

Hướng nghiên cứu

The issue points to a routing logic in the code where `pid = rand_.Uniform(pid_num);` is used. Look for the `CallProcedure` request handling and the tablet routing logic. The test `SQLSDKQueryTest.RequestProcedureTest` needs to be modified to use `options(partitionnum=8)` to reproduce. Understanding the partitioning and primary key (pk) based routing is key. Check how other requests route based on pk to see the pattern.

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả 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.