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

未关闭 适合新手
#904 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
backend, databases

调研方向

从 crates/core/src/validation/mod.rs 中的 validate_index_name 开始,并将其位置处理方式与 #830 中 crates/engine/src/update_table.rs 的 validate_update_index_name 进行比较。更改本地二级索引和长度子句之前,先测量它们的位置,因为 issue 指出这些位置尚未测量。完成标准是:无效的 CreateTable GSI 名称报告从 1 开始计数的 globalSecondaryIndexes.<n>.member.indexName 路径,并且相关行为经过检查。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
517
派生
60
平均合并
5 天 3 小时
30 天内合并 PR
79

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ExtendDB/extenddb 的其他 Issue

查看 ExtendDB/extenddb 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。