4paradigm / 4paradigm/OpenMLDB

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

オープン
#1,604 コメント 2 件 リアクション 0 件 担当者 1 名 @zhanghaohit が担当を希望しています GitHub で見る
enhancement
主要言語
C++
スター
1.7k
フォーク
331
平均マージ
12日 12時間
マージ済み PR(30日)
1

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
sql
領域
backend, databases
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。