4paradigm / 4paradigm/OpenMLDB

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

Ouverte
#1,604 2 commentaires 0 réactions 1 personne assignée Réclamée par @zhanghaohit Voir sur GitHub
enhancement
Langage dominant
C++
Étoiles
1.7k
Forks
331
Merge moyen
12 j 12 h
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
sql
Domaine
backend, databases
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.