Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

TransactWriteItems token replay ignores ReturnConsumedCapacity and ReturnItemCollectionMetrics

Đang mở
#514 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@LeeroyHannigan đang làm issue này rồi.

Từ ngày 24/10/2026.

  • #526 của @LeeroyHannigan — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

What happens

TransactWriteItems decides whether a request with a ClientRequestToken it has already seen is a replay by comparing a fingerprint of the request. The fingerprint covers TransactItems only (compute_fingerprint in crates/engine/src/transact_write_helpers.rs), so a second request that keeps the token and the items but changes ReturnConsumedCapacity or ReturnItemCollectionMetrics is served as a replay.

When the fingerprints differ, the error message is The request uses the same client token as a previous, but different, request.

What DynamoDB does

Measured 2026-10-24 at 17:31 UTC in us-east-1, client retries off. Each first call carries a token and one Update (SET v = :v), and the second call repeats the token and the items:

first call second call answer to the second call
no Return fields the same 200, replay
no Return fields ReturnConsumedCapacity: TOTAL 400 IdempotentParameterMismatchException
no Return fields ReturnConsumedCapacity: NONE 200, replay
no Return fields ReturnItemCollectionMetrics: SIZE 400 IdempotentParameterMismatchException
no Return fields ReturnItemCollectionMetrics: NONE 200, replay
ReturnConsumedCapacity: TOTAL no Return fields 400 IdempotentParameterMismatchException

The message in every mismatch row is Specified idempotent token was used with different request parameters within the idempotency window. The same mismatch, with the same message, was measured earlier the same day for a removal-only Update with ReturnConsumedCapacity: TOTAL added on the replay.

So the service compares the two Return fields as well as the items, and treats an absent field as NONE.

Reproduction on main (744ea291)

  1. TransactWriteItems with ClientRequestToken: t1 and one Update of key k.
  2. The same request with ReturnConsumedCapacity: TOTAL added.

ExtendDB answers the second call with 200 and ConsumedCapacity of 2.0 read capacity units, as a replay. DynamoDB answers IdempotentParameterMismatchException. A third call with the same token and a different key answers IdempotentParameterMismatchException on both, with the different message text above.

Ngôn ngữ chính
Rust
Star
517
Fork
60
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ExtendDB/extenddb

Tất cả issue của ExtendDB/extenddb

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.