CreateTable reports a global secondary index name outside the pattern at 'indexName', where DynamoDB names the member

Aperta Adatta ai principianti
#904 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, databases

Direzione di ricerca

Inizia con validate_index_name in crates/core/src/validation/mod.rs e confronta la gestione delle posizioni con validate_update_index_name in crates/engine/src/update_table.rs del #830. Misura le posizioni delle clausole sull’indice secondario locale e sulla lunghezza prima di modificarle, poiché l’issue dice che non sono state misurate. Il lavoro è completato quando i nomi GSI non validi di CreateTable indicano il percorso basato su 1 globalSecondaryIndexes.<n>.member.indexName e il comportamento pertinente è verificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

What ExtendDB does

validate_index_name in crates/core/src/validation/mod.rs writes the location as indexName for every index name it refuses. For a global secondary index of CreateTable the location DynamoDB gives is the member path.

Measured on 2026-11-06 at the head of #830 (ccdae81c2), SQLite and PostgreSQL:

Request ExtendDB
CreateTable with one GSI named g i 1 validation error detected: Value 'g i' at 'indexName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9_.-]+
CreateTable with GSIs gok and g<U+0000>i the same sentence with Value 'g<U+0000>i' at 'indexName'

What DynamoDB does

Measured in us-east-1 on 2026-11-06, with SDK parameter validation off. The index position is 1-based:

Request DynamoDB
one GSI named g i 1 validation error detected: Value 'g i' at 'globalSecondaryIndexes.1.member.indexName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9_.-]+
GSIs gok and g<U+0000>i ... Value 'g<U+0000>i' at 'globalSecondaryIndexes.2.member.indexName' ...

Suggested fix

Report a CreateTable GSI name fault at globalSecondaryIndexes.<n>.member.indexName. #830 does the same for UpdateTable (validate_update_index_name in crates/engine/src/update_table.rs, globalSecondaryIndexUpdates.<n>.member.create.indexName). The location for a local secondary index name and for the length clause is unmeasured. Measure it before changing it.

Related: #367, #830.

Lingua principale
Rust
Stelle
517
Fork
60
Merge medio
5g 3h
PR unite (30g)
79

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ExtendDB/extenddb

Tutte le issue di ExtendDB/extenddb

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.