Skip to content

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

Open

Description

@wjhuang2016

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions