Repository navigation
fix(core): give a set with duplicate members DynamoDB's text - #1368
LeeroyHannigan wants to merge 16 commits into
Conversation
ExtendDB gave its own text for a set that holds a member twice. An SS or
an NS listed its members as sent, without quotes. A BS listed each member
as the base64 of its bytes. No operation put "1 validation error
detected: " ahead of the text.
DynamoDB lists the members in another order. Measured in us-east-1 on
2026-11-22, each request twice. The members ahead of the first member
equal to an earlier one come first, sorted. That member and the members
after it follow, as sent. PutItem of the SS [b, a, b] gives this text:
1 validation error detected: One or more parameter values were
invalid: Input collection ["a", "b", "b"] contains duplicates.
An SS is printed as Rust's Debug prints a list of strings, so U+E000 is
printed as \u{e000}. Its members compare by code point. A BS is printed
as the JSON array of the padded base64 of its members. "of type BS
contains duplicates." follows it with no space before "of". Its members
compare as unsigned bytes. The text of an NS names no member, and
members equal as numbers, such as 1 and 1.0, are duplicates.
PutItem, UpdateItem and DeleteItem put "1 validation error detected: "
ahead of the text. This holds for an item at any depth, for
ExpressionAttributeValues and for AttributeUpdates. TransactWriteItems,
Query and Scan give the text without it.
A BS can hold a member that only DynamoDB's second reading of a B value
decodes, such as Y=Q=. Such a BS keeps the earlier text on every
operation measured. Its members are listed as sent, with no prefix.
BatchWriteItem lists the members as sent. The SS [b, a, b] gives "Input
collection [b, a, b] contains duplicates." after "One or more parameter
values were invalid: ". The NS [1, 1.0] gives "Input collection contains
duplicates", without that start and without a period.
The deserializer now lists the members in DynamoDB's order. A helper in
the engine adds the prefix for PutItem, UpdateItem and DeleteItem.
BatchWriteItem finds the first such SS or BS in its raw RequestItems and
gives its text with the members as sent. Its NS text names no member, so
it compares no NS member and replaces the deserializer's NS text. The
PartiQL parameter checks call the same function and keep their texts.
The PartiQL number set check moves into it.
Fixes #1312.
Fixes #1360.
The base decodes each BS member once and merges #544's branch, which moves the number set check of the PartiQL parameters to validation::number. The merge resolves three conflicts: - The imports of crates/core/src/partiql/params.rs. The base imports NUMBER_SET_DUPLICATES and has_equal_numbers for the PartiQL number set check. This branch deletes that check, so the merge keeps neither line. - binary_set in crates/core/src/types/attribute_value.rs. Both sides decode each member once. The merge keeps this branch's version, which lists the members in DynamoDB's order. - The attribute_value re-export list in crates/core/src/types/mod.rs. The merge keeps the names of both sides. The test module of attribute_value.rs is in attribute_value/tests.rs on both sides, so the base's new rows merge there with no conflict.
…descriptor
set_fault reads an ExpressionAttributeValues value that has a second
type descriptor. For an SS or a BS that holds a member twice, it gave
the text of the AttributeValue deserializer. An earlier commit of this
branch changes that text to a sorted list with quotes, which PutItem
gives. On this path the service lists the members as sent. Measured on
2026-11-25, each body twice, with :z as the key condition value:
{"SS": ["b", "a", "b"], "N": "1"}
... Input collection [b, a, b] contains duplicates. for key :z
{"BS": [the base64 of b, a and b], "N": "1"}
... Input collection [Yg==, YQ==, Yg==]of type BS contains
duplicates. for key :z
After the merge with #1355's branch, ExtendDB gave the sorted text, and
a_number_fault_in_a_value_with_several_types_is_named_ahead_of_the_several_types_text
and six rows of tests/test_query_value_shapes.py failed.
set_fault now takes the text of duplicates_as_sent, as BatchWriteItem
does. It lists the members of an SS or a BS as sent. Its NS text is the
text that set_fault gave before. The deserializer still gives the text
for an empty set.
…parison The merge of #544's branch brought a second NUMBER_SET_DUPLICATES, in validation::number, with the same text as the one that this branch adds in types::attribute_value. It also brought has_equal_numbers, which finds two members of a number set with one value, as the NS arm of duplicates_as_sent does. attribute_value.rs, BatchWriteItem and the PartiQL parameter tests now use the constant of validation::number. Its doc comment gets the 2026-11-22 BatchWriteItem measurement of this branch. The NS arm of duplicates_as_sent calls has_equal_numbers, which #850 and #854 call too. This commit deletes the copy of the constant in attribute_value.rs, its re-export from types, and the comparison in the NS arm. The answers do not change.
…es table I measured ten more requests on the service on 2026-11-25, each twice, on a table that does not exist. They cover shapes and operations that the table did not hold: - R1 and R2, PutItem: the members after the repeat stay as sent, and the text escapes a quote and a backslash. - R3 to R6: the key of GetItem, BatchGetItem, TransactGetItems and DeleteItem. - R7 and R8: a Query ExclusiveStartKey and a KeyConditions value. - R9: a PutItem Expected value. - R10: a BatchWriteItem DeleteRequest key, which lists the members as sent. ExtendDB already gives each of these answers. The table now holds them.
The base merges main at 14ade59. That brings #544 as a squash and ten other commits: #1280, #1009, #596, #1173, #398, #428, #567, #584, #588 and #864. The merge has no conflict. Git merged crates/engine/src/lib.rs, the one file with changes on both sides. Main compiles three modules only off wasm32 (backup, import_export_io and private_fs), and adds the modules backup_requests and pre_dispatch. This branch adds single_write_refusal after deserialize_error.
navareamol
left a comment
There was a problem hiding this comment.
-
In
set_fault(crates/engine/src/query_key_values.rs), a set beside a second type descriptor now takes the text ofduplicates_as_sent, which decodes aBSwithdecode_padded_base64. That is the PartiQL and BatchWriteItem decoder, but anExpressionAttributeValuesentry reads unpadded members, so aBSwith an unpadded member makesduplicates_as_sentreturnNoneand the deserializer's sorted text goes out. On a SQLite build of this head, a Query with":z": {"BS": ["Yg==", "YQ==", "Yg"], "N": "1"}answers... Input collection ["YQ==","Yg==","Yg=="]of type BS contains duplicates. for key :z, while the same set with"Yg=="last answers... Input collection [Yg==, YQ==, Yg==]of type BS ..., the form of R12.{"BS": ["YQ==", "YQ"], "N": "1"}answers["YQ==","YQ=="]here and[YQ==, YQ==]on #1355's head. The description says a set beside a second type descriptor gets the text of BatchWriteItem, so I think these should list the members as sent. Could this path decode withdecode_base64(for example by passing the decoder toduplicates_as_sent), with a row for an unpadded member? If DynamoDB was measured with an unpadded member there and gives the sorted text, could that row go in the table? -
first_duplicates_as_sent(&body["RequestItems"])in BatchWriteItem reads every member underRequestItems, including members the deserializer skips, so the text can name a set other than the one the deserializer refused. On this head,{"PutRequest": {"A": {"SS": ["q", "q"]}, "Item": {"pk": {"S": "k1"}, "v": {"SS": ["b", "a", "b"]}}}}answersOne or more parameter values were invalid: Input collection [q, q] contains duplicates., and #1355's head and main answer[b, a, b]. An unknown member besidePutRequestin the WriteRequest does the same. The comment above the walk says it finds "the set it refused". Could the walk read onlyPutRequest.ItemandDeleteRequest.Keyof each request, in the order the deserializer reads them?check_binarieson #1313 needs the same change. -
The
SStext follows Rust'sDebugfor strings. The measured rows cover U+E000, a quote and a backslash. On this head{"SS": ["\t", "\n", "\u0001", "\t"]}answers["\u{1}", "\t", "\n", "\t"], NUL prints as\0and a leading combining mark as\u{301}. Has anyone sent anSSwith a control character or a combining mark to DynamoDB? A row for one would pin the form. -
CI on this head ran on 25 November 2026 and the branch is 23 commits behind main. The
wasmfailure is E0308 atcrates/core/src/metrics/collector.rs:60:53, the error main had before #1482. TheTestrun passed on attempt 2; attempt 1 failed in the auth crate'ssecmem::init_refuses_under_a_low_memlock_limit_then_starts_unlocked, which this diff does not touch. The head merges with current main (92155f3) with no conflict, and on that mergecargo checkon the workspace with all targets, clippy on core and engine, fmt, and the core (1244) and engine (981) lib tests pass. Could you merge main so CI runs on it?
Behaviour I checked and found right: sets with a repeated member (1 with 1.0, 01, 1e0 and 1E0, 10 with 1e1, YQ== with YQ and YQ=, Y=Q= with //Q=, sets of 3000 members) in items, keys, expression values, ExclusiveStartKey, the legacy parameters, transactions, BatchWriteItem, PartiQL parameters, and UpdateItem ADD and DELETE. Each is refused with no 5xx and nothing stored, ADD and DELETE of an equal member written another way keep one member or remove it, the PartiQL texts match #1355's, and six reverted fixes each make a PR test fail.
I will approve once 1 and 2 list the members as sent (or a DynamoDB row shows otherwise) and CI has run on a branch with current main.
The base merges main at 01556cf, 27 commits past 14ade59, through #1260. It also checks only the items and keys of BatchWriteItem for padding, through padding_refusal in batch_write_item.rs. One file conflicted: crates/engine/src/batch_write_item.rs. The import list keeps the names of both sides. handle_batch_write_item first runs the padding check of the base. Then it runs the walk of this branch for the first set with a repeated member. Git merged four files with changes on both sides, at other lines: - crates/core/src/types/attribute_value.rs: the base changes check_binaries, and this branch adds the duplicates texts. - crates/engine/src/batch_write_item/padding_tests.rs: the base adds a test and the helpers tables and answer. This branch makes context pub(super). - crates/engine/src/lib.rs: main adds three modules and their exports, and this branch adds single_write_refusal. - crates/engine/src/query_key_values.rs: the base makes shape_fault pub(crate), and this branch changes set_fault.
…keys
BatchWriteItem replaces the sorted duplicates text of the deserializer
with the members as sent of the first set with a repeated member. The
walk read every member under RequestItems, so a set in a member that
the deserializer skips could give the text. For example, a PutRequest
with {"A": {"SS": ["q", "q"]}} beside its Item answered [q, q]. The
deserializer refused the set [b, a, b] of the item.
The walk now reads written_values, the attribute values of each
PutRequest Item and each DeleteRequest Key that the padding check
reads too. DynamoDB answers that request with "One or more parameter
values were invalid: Input collection [b, a, b] contains duplicates."
(measured 2026-12-02, twice, on a table that does not exist).
The table of set_duplicates_tests.rs gets that request as R13. It also
gets two PutItem rows of the same day, R14 and R15, which pin the form
of an SS member. Each answer comes after "1 validation error detected: ".
- ["\t", "\n", "\u{1}", "\0", "\t"] answers ["\0", "\u{1}", "\t",
"\n", "\t"].
- ["\u{301}", "a\u{301}", "\u{301}"] answers ["a\u{301}", "\u{301}",
"\u{301}"].
|
Add a v1.2.0 entry at the top of "Behavior Changes by Release" in docs/manuals/07-upgrade-manual.md, above the entry of #1355. It gives the 1.1.0 text and the texts of DynamoDB for an SS, a BS and an NS. It also names the operations that add the prefix, and gives the texts of BatchWriteItem.
I will approve once the manual bullet on a second type descriptor is corrected and the pending checks on a25b27a finish green. |
The base brings the BatchWriteItem check of #1313 that reads a fault ahead of a B in request order, also inside a value. It also brings the new sentence of the v1.2.0 entry of #1313 and the new Python test of #1355. One file conflicted: crates/engine/src/batch_write_item.rs, in the import list. The base drops AttributeValue, check_binaries and decode_padded_base64 and adds is_base64_refusal. The resolution also keeps first_duplicates_as_sent and is_listed_duplicates of this branch. Git merged padding_tests.rs, query_key_values.rs and the upgrade manual at other lines.
DynamoDB lists the members of an SS with a repeated member in the form
of Rust's Debug. On 2026-12-03, a PutItem on a table that does not
exist sent this SS twice:
["\u2028", "\u0085", "\u007f", "\u200d", "\u202e", "\uffff",
"\ud83d\ude00", "'", "\u4e2d", "\u2028"]
Both answers were this text, after "1 validation error detected: ":
One or more parameter values were invalid: Input collection ["'",
"\u{7f}", "\u{85}", "\u{200d}", "\u{2028}", "\u{202e}", "中",
"\u{ffff}", "😀", "\u{2028}"] contains duplicates.
The members ahead of the repeat come sorted by code point. ExtendDB
gives this text, and the table of set_duplicates_tests.rs now holds it
as R16.
The bullet on a second type descriptor in the v1.2.0 entry held for a Query only. It now says so. There, a BS with a member without its padding gets the sorted text. DynamoDB answers SerializationException with the length text of that member (#1404). A Scan answers the more than one datatypes text for such a value, as 1.1.0 did. A new bullet says that ExecuteStatement, BatchExecuteStatement and ExecuteTransaction give the texts of BatchWriteItem for a set in a parameter, as 1.1.0 did. An SS or a BS lists its members as sent, and the NS text has no start and no period. The SS bullet now names the characters whose form DynamoDB gave in a measurement (2026-11-22, 2026-11-25, 2026-12-02 and 2026-12-03): - a quote, a backslash, NUL, tab and line feed - U+0001, DEL, U+0085, U+200D, U+2028, U+202E, U+E000, U+FFFF and a combining mark - an apostrophe, a CJK character and an emoji
The base takes the docs change of fix/1258-unpadded-base64, one sentence of its v1.2.0 entry. The merge has no conflict.
|
|
Point 3: R16 is in crates/engine/src/batch_write_item/set_duplicates_tests.rs with the ten members of your PutItem and the text you quote, and the SS bullet of the entry lists the characters that row covers and the ones it does not claim. That DynamoDB writes them this way is your measurement, so I am not repeating it as mine. I read the row and the bullet and found them consistent. Point 4: the bullet on a second type descriptor now says Query, names the BS with a member without its padding, and says a Scan answers the more than one datatypes text. The new bullet for ExecuteStatement, BatchExecuteStatement and ExecuteTransaction matches the code I read in crates/core/src/partiql/params.rs, where a set in a parameter takes duplicates_as_sent, the BatchWriteItem text. Point 5: the head merges with main as of your last merge, but main has moved to c057660 (#1446) and a merge of it into this head conflicts in docs/manuals/07-upgrade-manual.md, where main added six lines. No code file conflicts, and the head of #1313 conflicts in the same way, so this comes from main moving. On ff0f2a2, 4 checks had passed, 1 was cancelled (the PR title check, rerun and passed) and 35 were queued or running when I looked. I will approve once main is merged and the checks on that head are green. |
The base brings main at b6c8595 through #1260 and #1313, with #1446, #1531 and #1466. It also brings the 15 new rows of #1260 in tests/test_binary_base64.py. One file conflicted: docs/manuals/07-upgrade-manual.md. #1446 and #1531 add two v1.2.0 entries at the top of "Behavior Changes by Release", where this branch adds its entry. The merge keeps the two entries of main first, then the entry of this branch, then the entry of #1355. No other file has changes on both sides.
|
@navareamol ea6a262 merges the new head of #1355, which brings main at b6c8595 through #1260. The upgrade manual conflicted where #1446 and #1531 add their entries. The merge keeps the two entries of main first, then the entry of this PR, then the entry of #1355. No code file conflicted. The checks run again on this head. |
navareamol
left a comment
There was a problem hiding this comment.
Main has moved again, to 5826e1b (#1087). A merge of it into ea6a262 conflicts in docs/manuals/07-upgrade-manual.md, where #1087 added the entry "SQLite parallel Scan segments follow the partition key" between the PostgreSQL TTL entry and the v1.1.0 entries. No code file conflicts, and the head of #1370 conflicts in the same way, so this comes from main moving under the stack. On ea6a262, 39 checks had passed, 1 was cancelled (conventional) and 28 were running or queued when I looked.
Your comment of 22:37 says the merge keeps the two entries of main first, then this entry, then the entry of #1355. The v1.2.0 headings at the head are in that order.
Points 3 and 4 of your last comment hold on this head. On a SQLite build of ea6a262, a PutItem with the ten members of R16 answers the text you quote, and R16 passes in the engine lib tests (985 pass). If the printing of U+200D is changed to the raw character, R16 alone fails, so the row pins it. A Query beside a second type descriptor, ExecuteStatement, BatchExecuteStatement and ExecuteTransaction answer as the entry says: the BatchExecuteStatement answer is HTTP 200 with the text in the error of the statement, and a Scan answers the more than one datatypes text. That DynamoDB writes the characters in this way is your measurement, and I have not repeated it.
All 70 checks pass on ea6a262, so I approve. The manual conflict with main sits in the whole stack, and the stack can fix it when it lands.
Changes since the last review
tests/test_binary_base64.py. One file conflicted:docs/manuals/07-upgrade-manual.md. fix(storage-mongodb): keep a DELETING table's tags until its document goes #1446 and fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531 add two v1.2.0 entries at the top of "Behavior Changes by Release", where this PR adds its entry. The merge keeps the two entries of main first, then the entry of this PR, then the entry of fix(core): read a B value with "=" or another character inside #1355. No other file has changes on both sides.cargo +1.97.0 fmt --all -- --checkis clean..github/workflows/clippy.ymlwith-D warnings, on the whole workspace as CI runs them, are clean.cargo +1.94.0 check --all-targetsis clean onextenddb-coreandextenddb-engine.cargo test -p extenddb-wasm-adapterpasses, with itsparitycorpus test.cargo test -p extenddb-storage-postgres --test doc_version_literalspasses..github/workflows/wasm.ymlis clean.tests/test_attribute_value_validation.py,tests/test_binary_base64.py,tests/test_batch_write_validation_order.py,tests/test_partiql_requests.py,tests/test_query_leading_keys_values.pyandtests/test_query_value_shapes.pypassed 577 tests each.python3 -m pytest --collect-only -qcollects 7522 tests intests/and 820 intests/pythonwith no error.What
A set that holds a member twice now gets DynamoDB's text. OOM is
One or more parameter values were invalid:.SScompares code points, and aBScompares unsigned bytes.SSlists its members with quotes, as Rust'sDebugprints a list of strings:OOM Input collection ["a", "b", "b"] contains duplicates.BSlists the padded base64 of its members as a JSON array, withof type BSright after it:OOM Input collection ["YQ==","Yg==","Yg=="]of type BS contains duplicates.NSnames no member:OOM Input collection contains duplicates.Members equal as numbers, such as1and1.0, are duplicates.1 validation error detected:ahead of the text. TransactWriteItems, Query and Scan do not.ExclusiveStartKey, or aKeyConditionsorExpectedvalue.SSor aBSas sent, in an item and in aDeleteRequestkey. The text isOOM Input collection [b, a, b] contains duplicates.ItsNStext isInput collection contains duplicates, with no start and no period.ExpressionAttributeValuesof a Query, a set gets the text of BatchWriteItem, wrapped asExpressionAttributeValues contains invalid value: ... for key :z. ABSmember without its padding gets the sorted text there, where DynamoDB answersSerializationException(Two type descriptors: DynamoDB answers a fault in any payload, a nested value or a PartiQL parameter, where ExtendDB answers the descriptor count #1404). A Scan answers the more than one datatypes text for such a value, as before this PR.BSwith a member that only the second reading of fix(core): read a B value with "=" or another character inside #1355 decodes, such asY=Q=, keeps the text of fix(core): read a B value with "=" or another character inside #1355. That text lists the members as sent, with no prefix.The deserializer in
crates/core/src/types/attribute_value.rsgives the listed texts.single_write_refusalincrates/engine/src/lib.rsadds the prefix for the three single-item writes, with the existingSINGLE_WRITE_PREFIX. BatchWriteItem reads the items and keys of its rawRequestItemsonce more (written_values, from #1313) for the firstSSorBSwith a repeated member. It skips number sets, whose text names no member. The PartiQL parameter checks call the same as-sent function, and so does the set check ofExpressionAttributeValuesbeside a second type descriptor. Their texts do not change. The PartiQL number set check is gone.The base of this PR is #1355.
Why
Fixes #1312
Fixes #1360
These are DynamoDB's answers, measured in us-east-1 on 22 November 2026 with signed requests. Each request went out twice and got the same answer both times. Each answer is a
ValidationException. PREFIX is1 validation error detected:.SS["b", "a", "b"]Input collection ["a", "b", "b"] contains duplicates.Input collection [b, a, b] contains duplicates.BS["Yg==", "YQ==", "Yg=="]Input collection ["YQ==","Yg==","Yg=="]of type BS contains duplicates.Input collection [Yg==, YQ==, Yg==]of type BS contains duplicates.SSwith U+E000, U+1F600 and U+E000Input collection ["\u{e000}", "😀", "\u{e000}"] contains duplicates.NS["1", "1.0"]Input collection contains duplicates.Input collection [1, 1.0] contains duplicates.SS["b", "a", "b"]Input collection ["a", "b", "b"] contains duplicates.Input collection [b, a, b] contains duplicates.SS["b", "a", "b"]Input collection ["a", "b", "b"] contains duplicates.Input collection [b, a, b] contains duplicates.SS["b", "a", "b"]Input collection [b, a, b] contains duplicates.NS["1", "1.0"]Input collection contains duplicatesInput collection [1, 1.0] contains duplicates.BS["Y=Q=", "YQ==", "//Q="]Input collection [//Q=, YQ==, //Q=]of type BS contains duplicates.The table shows a sample of 55 measured requests:
MorL.Of these, #1355 gives DynamoDB's answer to 22, and this PR to 54.
The one request that still differs has an
SSwith a repeat in the attributesand anNSwith a repeat inn. DynamoDB reports theSS, the first in request order. ExtendDB reports theNS, because the SQLite build reads the attributes of an item in name order. #1355 has the same order, and this PR changes only the text of the set it reports.The rows below are DynamoDB's answers of 25 November 2026, measured in the same way, on a table that does not exist. The key is
pk, and SET is{"SS": ["b", "a", "b"]}. This PR gives each of these answers.s{"SS": ["b", "a", "b", "d", "c"]}Input collection ["a", "b", "b", "d", "c"] contains duplicates.s{"SS": ["\"", "\\", "\""]}Input collection ["\"", "\\", "\""] contains duplicates.Input collection ["a", "b", "b"] contains duplicates.Input collection ["a", "b", "b"] contains duplicates.ExclusiveStartKeySETKeyConditionsEQ SETExpectedsValueSETDeleteRequest, key SETInput collection [b, a, b] contains duplicates.:z{"SS": ["b", "a", "b"], "N": "1"}ExpressionAttributeValues contains invalid value:OOMInput collection [b, a, b] contains duplicates. for key :z:ztheBSof the base64 ofb,aandb, with"N": "1"ExpressionAttributeValues contains invalid value:OOMInput collection [Yg==, YQ==, Yg==]of type BS contains duplicates. for key :zR1 shows that the members after the repeat stay as sent, and R2 shows the escapes of a quote and a backslash.
The rows below are DynamoDB's answers of 2 December 2026 (R13 to R15) and 3 December 2026 (R16), measured in the same way. This PR gives each of these answers.
PutRequestwith"A": {"SS": ["q", "q"]}beside itsItem, andsSET in the itemInput collection [b, a, b] contains duplicates.s{"SS": ["\t", "\n", "\u0001", "\u0000", "\t"]}Input collection ["\0", "\u{1}", "\t", "\n", "\t"] contains duplicates.s{"SS": ["\u0301", "a\u0301", "\u0301"]}Input collection ["a\u{301}", "\u{301}", "\u{301}"] contains duplicates.s{"SS": ["\u2028", "\u0085", "\u007f", "\u200d", "\u202e", "\uffff", "\ud83d\ude00", "'", "\u4e2d", "\u2028"]}Input collection ["'", "\u{7f}", "\u{85}", "\u{200d}", "\u{2028}", "\u{202e}", "中", "\u{ffff}", "😀", "\u{2028}"] contains duplicates.R13 shows that the service does not read a member that
PutRequestdoes not model. R14 and R15 show the escapes of a control character and of a combining mark, also after another character. R16 shows the escapes of DEL, U+0085, U+200D, U+2028, U+202E and U+FFFF. An apostrophe, a CJK character and an emoji stay as they are.Not in this PR
A
BSmember without its padding beside a second type descriptor inExpressionAttributeValues. Measured on 2 December 2026, Query with:zset to{"BS": ["Yg==", "YQ==", "Yg"], "N": "1"}getsSerializationExceptionBase64 encoded length is expected a multiple of 4 bytes but found: 2, and this PR gives the duplicates text (Two type descriptors: DynamoDB answers a fault in any payload, a nested value or a PartiQL parameter, where ExtendDB answers the descriptor count #1404).The order of the attributes of an item on the SQLite, PostgreSQL and Cassandra builds (the request above).
From the code, not measured: the PutItem error mapping lacks the
contains invalid keyandcontains invalid valuetexts ofdeserialize_error. So a refusal such asExpressionAttributeNames contains invalid value: ...may get another exception type on PutItem than on the other operations.A Scan
ExclusiveStartKeygets the same text as a Query one, from the same deserializer, and is not measured.Conflicts
git merge-treeshows no conflict withmain. The v1.2.0 entry of this PR sits at the top of "Behavior Changes by Release" indocs/manuals/07-upgrade-manual.md. Only the two entries of main that #1446 and #1531 add are above it. Other open PRs add their entries at the top too, so a merge with any of them conflicts there. #1110, #1114 and #1126 add theirs below the entry of #1260, and conflict there. Whichever PR merges second keeps both entries. In the code, this PR adds conflicts with four open PRs.crates/engine/src/delete_item.rsandcrates/engine/src/update_item.rs. fix(engine): answer a missing TableName, Key or Item as DynamoDB does #1262 replaces the sameserde_json::from_value(body).map_err(crate::deserialize_error)lines withcrate::read_input(...). The resolution passes|e| crate::single_write_refusal(crate::deserialize_error(e))toread_input.check_valueincrates/core/src/partiql/params.rs. fix(core): check the payloads of a two descriptor value before the count #1381 addspayload_refusal(tag, payload)?;where this PR deletes the number set check. The resolution keeps fix(core): check the payloads of a two descriptor value before the count #1381's line.crates/engine/src/query_key_values.rsand the doc comment ofNUMBER_SET_DUPLICATESincrates/core/src/validation/number.rs. fix(scan): report every Limit, Segment and TotalSegments range fault in the service's two forms #850 movesFault,first_faultandset_faulttocrates/engine/src/query_key_values/value_fault.rs. The resolution keeps fix(scan): report every Limit, Segment and TotalSegments range fault in the service's two forms #850's side ofquery_key_values.rs, and makes the change of 13d3e5a inset_faultinvalue_fault.rs. The doc comment keeps both measurements. The rowduplicate NS member ahead of Selectincrates/engine/src/scan_request/tests.rsthen expectsOne or more parameter values were invalid: Input collection contains duplicates., the service's text that its comment gives.crates/core/src/partiql/params.rs. The resolution keeps fix(scan): check AttributesToGet, ScanFilter, ExclusiveStartKey and ExpressionAttributeValues in the service's order #854's side ofquery_key_values.rs, because fix(scan): check AttributesToGet, ScanFilter, ExclusiveStartKey and ExpressionAttributeValues in the service's order #854's own set faults already list the members as sent beside a second type descriptor. It keeps both measurements in the doc comment, and inparams.rsit keepspub use crate::validation::NESTING_MESSAGE;and drops the two number set lines. fix(scan): check AttributesToGet, ScanFilter, ExclusiveStartKey and ExpressionAttributeValues in the service's order #854 adds araw_bodyparameter todispatch, so thedispatchcall ofcrates/engine/src/batch_write_item/set_duplicates_tests.rspasses the request text, as the calls of the base'spadding_tests.rsmust.Testing done
The runs below are on bb1050e, before the merges of #1355's new heads, unless a line names another tree. "Changes since the last review" gives the runs on the commits since the last review.
cargo test -p extenddb-core -p extenddb-engine --lib --no-fail-fast: 1148 core unit tests passed and 1 ignored, and 931 engine unit tests passed.cargo +1.97.0 fmt --all -- --checkis clean.cargo +1.97.0 clippy -p extenddb-core -p extenddb-engine --all-targets -- -D warnings, the same with--features extenddb-engine/backup-test-hooks, andcargo +1.91.1 check -p extenddb-core -p extenddb-engine --all-targetsare clean.set_faulttake the as-sent text for anNSonly, as before 13d3e5a. Thena_number_fault_in_a_value_with_several_types_is_named_ahead_of_the_several_types_textfails at{"N": "1", "SS": ["a", "a"]}, and 6 rows ofTestValuesTheServiceCannotReadAsOneTypeintests/test_query_value_shapes.pyfail:SS dup then N 1,SS dup then N bob,SS dup then X,SS dup then L with null,S then L with SS dupandBS dup then N 1. R11 and R12 get the sorted text.tests/test_attribute_value_validation.py,tests/test_binary_base64.py,tests/test_partiql_requests.py,tests/test_query_value_shapes.py,tests/test_batch_write_validation_order.py,tests/test_partiql_batch.py,tests/test_partiql_phase3.py,tests/test_partiql_transaction.pyandtests/test_partiql_write.py.devtools/run-wasm-step clippyis clean on a scratch merge of bb1050e withmain(fec675db4). bb1050e lacksdevtools/wasm-clippy, which feat(wasm): [Add WebAssembly browser support for ExtendDB #1009 added onmain.python3 -m pytest --collect-only -qcollects 7168 tests intests/and 672 intests/python, with no error.MandLvalues. Each request that the rule covers got the rule's answer, and no answer that matched DynamoDB on fix(core): read a B value with "=" or another character inside #1355 changed. Every ExecuteStatement answer is the same on both. The extra BatchWriteItem read takes 1.78 ms on a request of 25 items with 750,000 number set members. It takes 27.7 ms on a request with 105,000 binary set members. The deserializer takes 306 ms and 47 ms on the same requests.At 9d56bbe against #1355's head 874a372, production is +218 -79, the tests are +372 -1, and the upgrade manual is +15. These count the Rust lines of an inline test module as tests. The commit 2605716 is +5 -4 in production and +13 -1 in the tests. a25b27a adds 14 lines to the upgrade manual.
Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
Breaking changes
__typedo not change. A client that matches the message text gets the texts above. The v1.2.0 entry ofdocs/manuals/07-upgrade-manual.mdgives this change.By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.