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

Open Beginner friendly
#904 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend, databases

Research direction

Start with validate_index_name in crates/core/src/validation/mod.rs and compare its location handling with validate_update_index_name in crates/engine/src/update_table.rs from #830. Measure the local secondary index and length clause locations before changing them, as the issue says those are unmeasured. Done when invalid CreateTable GSI names report the 1-based globalSecondaryIndexes.<n>.member.indexName path and the relevant behavior is checked.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Rust
Stars
517
Forks
60
Avg merge
5d 3h
Merged PRs (30d)
79

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ExtendDB/extenddb

All issues in ExtendDB/extenddb

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.