Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Rust-dataplane] SHOW SESSION_STATES current-db non-string/null must be ignored like Go

オープン 初心者向け
#1,366 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

rust/crates/session-core/src/internal_client.rs の validate_session_states を読み、pkg/proxy/backend/backend_conn_mgr.go の updateAuthInfoFromSessionStates での処理と比較してください。current-db が文字列、null、文字列以外の値の場合のセッション状態の挙動を確認してください。Rust が文字列以外の値を無視し、Go と同様に current_database を未設定のまま処理を続ければ完了です。

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

説明

migration:bb7133-tiproxy

Migrated from bb7133/tiproxy#202. Original author: wjhuang2016; created: 2026-09-02T12:43:43Z; source body SHA-256: c506916b5151c54bfa1d4417fbf969b7c18e8542b1e45540bfcecd11e919ad74.

Rust dataplane rewrite parity/functional RED
  • Snapshot commit: 60efdf5e6e8226423df85033534ad748ccb129db
  • Run: run.tiproxy-rust-dataplane.session-states-current-db-type.20260902.RED
Problem

Go updateAuthInfoFromSessionStates only applies current-db when type assertion to string succeeds; null/number is ignored. Rust validate_session_states rejects non-string values as MalformedSessionStates.

Claim

when SHOW SESSION_STATES returns current-db:null or current-db:, Rust must treat it as no authoritative database and continue, matching Go.

Source anchors
  • pkg/proxy/backend/backend_conn_mgr.go:729-739 updateAuthInfoFromSessionStates type assertion
  • rust/crates/session-core/src/internal_client.rs:757-769 validate_session_states rejects non-string
Boundary
  • Before: Rust rejects the whole snapshot as MalformedSessionStates
  • After: Go ignores non-string current-db and proceeds with current_database None
Local evidence
  • run.tiproxy-rust-dataplane.session-states-current-db-type.20260902.RED
主要言語
Go
スター
74
フォーク
40
平均マージ
13時間 16分
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingcap/tiproxy のほかの issue

pingcap/tiproxy の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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