BatchWriteItem: the refusal of 26 requests for one table quotes each request as `WriteRequest`, where DynamoDB names the member path or quotes every field

Đang mở Phù hợp với người mới
#1,039 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, databases

Hướng nghiên cứu

Đọc crates/engine/src/request_limits.rs, đặc biệt là write_requests_repr và per_table_count_error. Trước tiên, kiểm tra cách check_batch_counts và check_request_item_counts của máy chủ sử dụng lỗi đó. Thay đổi phản hồi khi vượt giới hạn sang dạng có đường dẫn thành viên được đo, đồng thời giữ nguyên văn bản dành cho danh sách rỗng; hoàn thành khi phản hồi khớp với dạng được đề xuất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

BatchWriteItem refuses a table with more than 25 requests. ExtendDB's message quotes the request list with each request as the bare word WriteRequest. Amazon DynamoDB answers in one of three forms, and none of them prints a request that way. Closed issue #108 listed this request among its rows, and ExtendDB still answers it with the bare type names.

Measured in us-east-1 on 2026-11-14 and 2026-11-16. BatchWriteItem on a table keyed on pk (S), with 25 PutRequests of {"pk": {"S": "em-bw-k<i>"}} and a 26th whose item is {"pk": {"S": "em-bw-nested"}, "doc": {"M": {"inner": {"L": [{"S": "a"}, {"NULL": true}]}}}}. DynamoDB answers ValidationException with one of these messages:

Form DynamoDB message
Member path 1 validation error detected: Value at 'RequestItems.<table>.member' failed to satisfy constraint: Member must have length less than or equal to 25
Quoted map 1 validation error detected: Value '{<table>=[WriteRequest(putRequest=PutRequest(item={pk=AttributeValue(s=em-bw-k0, n=null, b=null, iNT=null, dECIMAL=null, dOUBLE=null, sS=null, nS=null, bS=null, iNTSET=null, dECIMALSET=null, dOUBLESET=null, m=null, l=null, nULL=null, bOOL=null)}, workloadProfileName=null), deleteRequest=null), ...]}' at 'requestItems' failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 25, Member must have length greater than or equal to 1]
Quoted map with object hashes the quoted map with each value printed as com.amazonaws.dynamodb.v20120810.AttributeValue@<hex>

On 2026-11-14 both sends at 16:37 UTC answered the member path form, and both sends at 16:53 UTC answered the quoted map. The quoted map prints all 26 requests, and it prints the nested value of the 26th level by level, each level in its own AttributeValue(...) frame. On 2026-11-16, 5 of 20 sends answered with object hashes.

ExtendDB at origin/main 95425f5e8 answers 1 validation error detected: Value '{<table>=[WriteRequest, WriteRequest, ..., WriteRequest]}' at 'requestItems' failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 25, Member must have length greater than or equal to 1], with WriteRequest 26 times. It gives this answer on SQLite, SQLite in dev mode, PostgreSQL, MongoDB and Cassandra.

per_table_count_error (crates/engine/src/request_limits.rs, line 138) builds the message at lines 149 to 154 from write_requests_repr (line 62), which returns vec!["WriteRequest"; count].join(", "). The comment on write_requests_repr (lines 60 and 61) says that the service prints each request as its type name. The measurements above do not show that form. check_batch_counts (line 78) calls per_table_count_error at line 116. The server runs the same check before authorization (check_request_item_counts, line 170).

Proposed change: for a table with more than 25 requests, answer the member path form. It is one of DynamoDB's measured answers, and it carries no copy of the requests. The empty request list keeps its present text.

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

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.