Skip to content

UpdateItem with only REMOVE actions on a missing key creates an item holding the key #478

Closed

Description

@LeeroyHannigan

What DynamoDB does

Measured 2026-10-23 at 14:11 UTC in us-east-1, client retries off, on a hash-key table (pk S) and a hash and range table (pk S, sk S):

request response
UpdateItem REMOVE w on a key that does not exist, no ReturnValues 200 {}
GetItem on that key afterwards no Item

The service writes nothing when an update removes attributes from an item that does not exist. SET and ADD on a missing key create the item, as expected.

What ExtendDB does

The same request answers 200 and creates an item that holds only the key attributes: GetItem on that key returns {"pk": ...}, and sk on the range table.

Seen on SQLite. On MongoDB the same request answered 500 on main; with #473 it creates the same key-only item as SQLite. PostgreSQL and Cassandra were not measured.

Fix

When the item does not exist and the update expression only removes attributes, write nothing, as the service does. ReturnValues ALL_NEW and UPDATED_NEW on that request, and the legacy AttributeUpdates form with only DELETE actions, need their own measurements. Test under tests/, run against the service and every backend.

Related: #436, #473.

Activity

  1. added this to the 1.0 milestone on Oct 27, 2026
  2. added 2 commits that reference this issue on Oct 30, 2026
    cfa904a
    bd1a002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

release-blockerMust ship for its milestone's releasev1Needed for the 1.0 release

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions