Skip to content

The Keys and AttributeDefinitions lists in the undefined-index-key sentence differ from the service #554

Open

Description

@LeeroyHannigan

Summary

The Some index key attributes are not defined in AttributeDefinitions. Keys: [..], AttributeDefinitions: [..] sentence renders its two lists differently from the service, on both CreateTable and UpdateTable.

Measured 2026-10-25 (us-east-1), index with keys g HASH and r RANGE unless stated:

Request Service ExtendDB main 744ea29
definitions [pk, g] (r missing) Keys: [r, g], AttributeDefinitions: [pk, g] Keys: [r], AttributeDefinitions: [pk, g]
definitions [pk, r] (g missing) Keys: [r, g], AttributeDefinitions: [r, pk] Keys: [g], AttributeDefinitions: [pk, r]
definitions [pk] (both missing) Invalid KeySchema: Some index key attribute have no definition Keys: [g], AttributeDefinitions: [pk]
keys a HASH, b RANGE, definitions [pk, a] Keys: [a, b], AttributeDefinitions: [a, pk] Keys: [b], AttributeDefinitions: [pk, a]
definitions [zz, pk, aa], key b missing Keys: [b], AttributeDefinitions: [zz, aa, pk] Keys: [b], AttributeDefinitions: [zz, pk, aa]

Three differences: the service's Keys list carries every key of the index, not the missing ones; two or more missing keys with a non-empty member answer the Invalid KeySchema sentence (the one #548 encodes for the empty member); and the service renders both lists in an order that is neither the request's nor alphabetical ([zz, pk, aa] renders [zz, aa, pk], [pk, n, b] renders [n, b, pk]), consistent across repeats, so it is not reproducible from the request.

Fix shape

Render every index key in Keys; answer two or more missing keys with Invalid KeySchema: Some index key attribute have no definition; keep request order for the lists and record the order difference in the differences document. Both paths: crates/core/src/validation/mod.rs (CreateTable) and crates/engine/src/update_table.rs (UpdateTable). The wire rows in #548 use one-key shapes, where the lists have one element, and pass on the service.

Found while reviewing #520.

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions