Repository navigation
feat(storage): a StorageError::Service variant the engine passes through - #529
LeeroyHannigan wants to merge 16 commits into
Conversation
A backend that can classify its own failure into the service's error
vocabulary (a hosted database reporting a documented unavailability or
capacity condition) had no way to return that error with its own message:
every unrecognised StorageError variant reaches the client as the fixed
"Internal server error" string after an error-level log line.
StorageError::Service(DynamoDbError) carries a fully formed client error.
Nine engine functions map a StorageError to a client error. Six own a
catch-all and gain a Service arm that returns the error with its variant
and message unchanged and without the fault log line: the data path mapping
in create_table.rs, the backup mapping in backup.rs, the UpdateTable
mapping, the streams and TTL mappings, and sanitize_storage_error for the
metadata and tagging paths. The other three (the condition-check variant of
the data path mapping, the create-backup and restore mappings) delegate
their catch-all to one of the six. The server's authorization read
delegates to the data path mapping.
The engine keeps one rule for itself. A ConditionalCheckFailedException
carries its item to the client only when the request set
ReturnValuesOnConditionCheckFailure to ALL_OLD, which the condition-check
mapping applies to a backend's error as it does to the engine's own
ConditionFailed; the generic data path mapping, which has no such value to
read, discards the item as it does for ConditionFailed. The message is kept.
Tests: a Service pass-through test at every one of the nine mappings; at
each of the six with a catch-all, a control that Internal("driver text")
still becomes the fixed string, and a subscriber-based test that counts
error-level log events (none for a Service error, one for an Internal
error). tracing-subscriber becomes a dev-dependency of the engine crate for
that test. The condition-check item rule has a test per
ReturnValuesOnConditionCheckFailure value and one for the generic path.
The doc comment states the backend's obligation: the message crosses the
wire verbatim, so it must be service-shaped text with no driver output, host
names, connection strings or credentials; an unclassified failure stays
Internal, and Transient remains the queue workers' retry signal.
…ls, the RFCs and an ADR The storage design lists the variant beside the Internal redaction rule and states the backend's obligation for the message. The security model's error message section names it as the one path that carries backend-chosen text to a client, under the same wording rule as the engine's own messages. The backend author manual's DataEngine section states when to return it and when a failure stays Internal. RFC-0003 section 9.2 adds the obligation to the error fidelity criteria. RFC-0002 states that variants may be added to StorageError in a minor release, so a backend crate matching on it exhaustively carries a catch-all arm. ADR-0023 records the decision, the options not taken and the consequences.
1fd29a0 to
d994093
Compare
crates/engine/src/lib.rs: main added the start_key module to the module list. This branch added the service_error_log_tests module under cfg(test) at the same place. The merged file declares both, in name order. docs/adr/README.md: main added rows for ADR-0023 (catalog migrations), ADR-0026 (credential cryptography on AWS-LC) and ADR-0027 (Cassandra index row version stamps). This branch added its ADR as 0023. Main owns number 0023, and the open read-options and Cassandra consistency branches hold 0024 and 0025, so the ADR of this branch moves to 0028. The file is renamed to 0028-backend-classified-client-error.md, its title line reads ADR-0028, and the README keeps main's three rows and lists the new row after them. No other file names the number.
crates/engine/Cargo.toml: main added `futures` to the engine's dependencies for the backup catalog work. This branch added a `[dev-dependencies]` section with `tracing-subscriber` for the log test at the mapping sites. The result lists `futures` with the other dependencies and keeps the dev-dependency section below it. Cargo.lock is main's file with `tracing-subscriber` added to the engine's dependency list, the one entry this branch brings.
crates/engine/Cargo.toml keeps the tokio test-util, extenddb-storage-sqlite, tempfile and libc dev-dependencies from main and the tracing-subscriber dev-dependency from this branch. crates/engine/src/streams.rs keeps the tests module in streams_tests.rs from main and the Service arm from this branch. The Service pass-through tests from this branch move into streams_tests.rs. crates/engine/src/update_table.rs keeps the tests module in update_table_tests.rs from main and the Service arm from this branch. The Service pass-through tests from this branch move into update_table_tests.rs. docs/adr/README.md keeps the ADR-0029 row from main and the ADR-0028 row from this branch.
Main added the runtime, store_identity, store_maintenance and sync modules to backup.rs. The merge placed this branch's service_error_tests declaration after them, where rustfmt wants it before store_identity. This commit moves the declaration. Nothing else changes.
ADR-0031 records the stored form: the escape of the item documents, the refusal of U+0000 in a PostgreSQL key, the MongoDB mark, and migration 13. 0031 is the first number that no open PR claims: #529 and #536 add 0028, and #954 adds 0030. - differences-from-dynamodb.md lists the refusal of U+0000 in a key on PostgreSQL. - The upgrade manual's entry is now a v1.1.0 entry. It says what an operator sees when the data body fails after the catalog body committed, and describes the MongoDB mark. The Current Status paragraph about 1.0.0 and migrations 1 to 12 is as main has it. - 04-component-storage.md and the escape module's comment no longer say that the key columns hold escaped text. The escape's byte order and prefix tests go with that claim. map_json checks a key with needs_escape.
demohan
left a comment
There was a problem hiding this comment.
No backend in the tree returns StorageError::Service yet, so no request changes on the wire today. The findings below are on the paths a backend reaches once it returns the variant for a capacity condition, as the PR intends. They were measured in process with the engine's Scripted double and compared with the service's answer to the same throttle.
- The item rule the PR copies holds where it is applied: on PutItem, UpdateItem and DeleteItem,
ALL_OLDreturnsItemandNONEdoes not, with "The conditional request failed", on the service and on a SQLite build of this head. - Throttled TransactWriteItems and ExecuteStatement answer 400 ProvisionedThroughputExceededException on the service, which is the class a
Serviceerror passes through on those paths. - The nine mapping functions cover every place a
StorageErrorbecomes a client error,StorageErrorstays 56 bytes, and the key-info cache stores no errors. - fmt, clippy and the 1.91.1 check are clean. 4,258 tests pass across 13 library binaries, and CI is green on 66 of 66 checks.
I will approve once the items below are done.
crates/engine/src/batch_write_item.rs:421
is_deferrable knows only the engine's own retryable variants. With the double scripted [Ok, Err(Service(ProvisionedThroughputExceededException)), Ok], the batch answers 400 for the whole request after the first write has committed, and the third is never tried, so a client retry repeats the first. Service(ServiceUnavailable) behaves the same way. The service, on a 1 WCU table with 25 puts of 100 KB, answered 200 with 14 and then 13 of 25 in UnprocessedItems, and answered the exception only when nothing applied. batch_get_item.rs:178 and :191 have the same shape. Treating the retryable Service classes as deferrable would match.
crates/engine/src/partiql/common.rs:521
BatchExecuteStatement turns ProvisionedThroughputExceededException, ThrottlingException, RequestLimitExceeded, InternalServerError, TransactionConflictException, ItemCollectionSizeLimitExceededException and ServiceUnavailable from a Service error into {"Code": "ValidationError"}. The service answers 5 throttled INSERTs with Code ProvisionedThroughputExceeded and TableName on each entry. Mapping each class to its BatchStatementErrorCodeEnum code would carry it through, as the PR body says.
Conditional check item outside create_table
The doc comment, ADR-0028, the design doc and the backend manual say a conditional check error carries its item only for ALL_OLD. Only the two create_table.rs mappers apply that. Service(ConditionalCheckFailedException(msg, Some(item))) reaches the client with its item through the mappers in backup.rs:2168, update_table.rs:397, streams.rs:493, ttl.rs:232 and lib.rs:188. One helper that every Service arm calls would apply the rule everywhere.
crates/server/src/request_helpers.rs:143
Optional. A Service error from the key-info read is returned before the cross-account refusal and the IAM decision. A backend that answers Service(ResourceNotFoundException) there would tell a caller without access that the table does not exist. Nothing tests this hand-off.
| // is the item on a conditional check error: this generic path discards | ||
| // it, as it does for its own ConditionFailed, and | ||
| // `storage_err_to_dynamo_with_ccf` returns it when the caller asked. | ||
| StorageError::Service(DynamoDbError::ConditionalCheckFailedException(msg, _)) => { |
There was a problem hiding this comment.
The tests give the backend error "The conditional request failed", which is the engine's own text, so replacing the backend's message with that text in this arm and in the _with_ccf arm leaves every test passing. A distinct backend message, asserted at the client, would hold the claim.
There was a problem hiding this comment.
Fixed in 3bcee8d. The tests now give every mapping one set of rows. Each backend message is text the engine never writes. The conditional check row uses "The stored item does not match the condition." The test compares each row with the body the client gets (error_document) by equality. With your mutant (the engine's "The conditional request failed" in place of the backend message), the old tests passed 21 of 21. Now the mutant in service_err_to_dynamo, the one arm that both mappers reach for a conditional check error, fails 4 tests. The same mutant in the ALL_OLD arm of storage_err_to_dynamo_with_ccf fails a_backend_conditional_check_error_keeps_its_item_only_under_all_old.
| ## Context | ||
|
|
||
| Every storage trait method returns `Result<T, StorageError>`. The engine maps a | ||
| `StorageError` to the client-facing `DynamoDbError` at nine functions |
There was a problem hiding this comment.
Three of the nine functions delegate to another mapper, the create_table one is exhaustive with no catch-all, and streams::shard_lookup_error (streams.rs:222) is a tenth mapper. The log test covers 6 sites.
There was a problem hiding this comment.
Corrected in 5d14699. The ADR now counts ten functions. Five end in a catch-all: the backup mapping (now in backup_requests.rs), UpdateTable, streams, TTL and sanitize_storage_error. The data path mapping names every variant, and four delegate: the conditional check, create-backup, restore and shard lookup mappings. The log test runs at the seven mappings the crate root can reach, which include the six that write the fault log line. The three private ones write no log line of their own. Their modules run the same rows through them, and the ADR says so.
| } | ||
|
|
||
| /// Runs `f` under a fresh subscriber and returns how many error events it logged. | ||
| fn error_events_during(f: impl FnOnce()) -> usize { |
There was a problem hiding this comment.
Optional. The test failed 7 times in 400 runs at 32 threads, always as "streams::storage_to_dynamo logged 0 fault events", and 0 times in 200 serial runs. Tracing's callsite interest cache, shared with other test threads, is the likely cause, and it would also let the "not logged" half pass without checking. One global subscriber with a per-thread counter avoids it.
There was a problem hiding this comment.
Fixed in 87aa815. The cause is the one you name. tracing computes a callsite's interest the first time any thread reaches it. While the counting subscriber is the only registered dispatcher in the process, it computes it from the default of that thread (tracing-core 0.1.36, callsite.rs, Rebuilder::JustOne). A test thread without a subscriber that reaches streams::storage_to_dynamo's log line first caches it as never, and the count reads 0.
The backup log tests on main already install a global subscriber that is interested in every callsite and enabled for none. I moved it to crates/engine/src/test_tracing.rs, and error_events_during installs it before it sets the thread default, so the interest is computed from every live dispatcher. The flake did not reproduce here: 0 failures in 400 runs at 32 threads on the review head merged with main (f55f560). The fix also gave 0 in 400. So I added an_event_from_a_callsite_another_thread_met_first_is_counted: another thread meets a fresh callsite first, and the test counts 1 event. Without the global subscriber it counts 0.
| - DynamoDB-fidelity error messages reproduce real DynamoDB exactly (no additional information) | ||
| - Internal errors (database connection failures, SQL errors, I/O errors) are logged server-side but return generic messages to clients | ||
| - Stack traces, file paths, and SQL text are never exposed to clients | ||
| - One path carries backend-chosen text to a client: a backend may return `StorageError::Service(DynamoDbError)` when it has classified its own failure into a service error class, and the engine returns that error with its message unchanged. The message inside is client-facing text the backend author owns; it must not contain driver output, SQL text, paths or connection details, and it is reviewed as client-visible wording under the same rule as the engine's own messages |
There was a problem hiding this comment.
Optional. This and 12-extending-extenddb-storage.md:101 call Service the one path for backend text. Validation, IndexesInUse, Unsupported, LimitExceeded and BackupInUse already pass backend text to the client.
There was a problem hiding this comment.
Corrected in f5457b6 and 999b71d. Both pages now name the other variants whose message reaches the client as the backend wrote it. They are Validation, NoOpUpdate, Unsupported, IndexesInUse, LimitExceeded, BackupInUse and TransactionConflict, plus the cancellation reasons of TransactionCanceled. The backup and streams mappings also pass on the message of TableNotFound, and the backup mapping passes on that of TableAlreadyExists and TableNotActive. The same rule for the text applies to all of them. NoOpUpdate, TransactionConflict and the three table-state variants are the ones I added to your list. The data path mapping passes their message unchanged too.
crates/engine/src/backup.rs: main moved the backup error mapping `storage_err_to_dynamo` from backup.rs to backup_requests.rs. The result keeps main's backup.rs, and the Service arm of this branch moves into the function in backup_requests.rs. backup.rs keeps this branch's `service_error_tests` module declaration. crates/engine/src/service_error_log_tests.rs names the backup mapping by its new path, crate::backup_requests::storage_err_to_dynamo. The old path is a private import of backup.rs and does not compile from the crate root.
…ional check item A ConditionalCheckFailedException inside StorageError::Service reached the client with its item through the backup, UpdateTable, streams and TTL mappings and through sanitize_storage_error. Only the two create_table mappings applied the ALL_OLD rule that the variant's doc comment states. create_table::service_err_to_dynamo now holds the rule, and every Service arm calls it. It returns the error unchanged, except that a conditional check error loses its item. storage_err_to_dynamo_with_ccf keeps one arm of its own, for a request that set ReturnValuesOnConditionCheckFailure to ALL_OLD. The tests now give every mapping the same rows: five backend-classified errors, each with a message that the engine never writes. Each row holds the body the client gets (error_document), and the CCF row has an item. The rows run at the seven mappings that the crate root can reach. The create-backup, restore and shard lookup mappings delegate to these, and their own modules run the rows through them. This commit removes the per-site tests that the rows replace. They used the engine's own text "The conditional request failed" as the backend message. A mapping that replaced the backend message with that text passed them.
…ts error class A statement whose item operation failed with a throttle, a conflict or a fault of the server got Code ValidationError in its BatchExecuteStatement entry. A Service error from a backend reaches the entry this way, and so do the engine's own conflict and internal errors. StatementError::from_error now takes the Code from batch_code. That function gives the code that the API Reference lists for each class (BatchStatementError): ProvisionedThroughputExceeded, ThrottlingError, RequestLimitExceeded, TransactionConflict, ItemCollectionSizeLimitExceeded and InternalServerError. The list has no code for ServiceUnavailable, which gets InternalServerError. Every other class keeps ValidationError. The message and the TableName rule do not change: the entry names the table when the failure reached the item. The test has one row per class and compares the whole entry.
… missing table authorize_request reads the table's key schema before the IAM decision, which needs it for dynamodb:LeadingKeys. key_info_for_authz passed every error of that read except TableNotFound to the caller. A backend that answers StorageError::Service(ResourceNotFoundException) there told a caller without access that the table does not exist, before the IAM decision could refuse the caller. key_info_for_authz now treats that error as it treats TableNotFound: the key stays absent, the IAM decision runs, and a caller it refuses gets the refusal. Every other Service error still fails closed with its own class. Mapped to a missing table, such an error would reach the policy evaluator with dynamodb:LeadingKeys absent. The doc comment gives that as the reason for failing closed on transient and connection faults. The tests gain a row for the backend's not-found and one for a backend-classified ServiceUnavailable.
…t covers The ADR said that nine functions map a StorageError to a client error and that each ends in a catch-all. At this head there are ten. Five end in a catch-all, and the data path mapping names every variant. Four delegate to one of those six: the conditional check mapping, the create-backup and restore mappings and the shard lookup mapping. The ADR now lists them by file. The decision section names create_table::service_err_to_dynamo as the one function every Service arm calls, and the rule it applies to a conditional check error's item. It also records the two answers that depend on the error's class. One is the Code of a BatchExecuteStatement entry. The other is the server's key schema read before the IAM decision, which treats a backend's ResourceNotFoundException as a missing table. The rationale section says that the log test runs at the seven mappings the crate root reaches. The three private mappings write no log line of their own, and their modules' tests cover them.
The security model and the backend author manual called StorageError::Service the one path that carries backend-chosen text to a client. The data path mapping also passes on the message of Validation, NoOpUpdate, Unsupported, IndexesInUse, LimitExceeded, BackupInUse and TransactionConflict as the backend wrote it. It passes on the cancellation reasons of TransactionCanceled too. Both pages now list these variants and apply the same rule to their text: service-shaped, with no driver output, host names, connection strings or credentials. The security model also records that the server reads a table's key schema before the IAM decision. A backend's ResourceNotFoundException from that read is a missing table, so a caller the IAM decision refuses gets the refusal.
…ackup log tests use The Service log test sets a counting subscriber as the thread's default. tracing caches each callsite's interest when a thread first reaches it. While one thread default is the only subscriber in the process, that cache comes from the default of the thread that got there first. A test without a subscriber that reaches a mapping's log callsite first caches it as "never", and the count then reads 0. A count of 0 is also the expected answer for a Service error, so that half of the test could pass without checking. The backup log tests already install a global subscriber that is interested in every callsite (InterestedInEveryCallsite). This commit moves it into crates/engine/src/test_tracing.rs, and both the backup LogLines and error_events_during install it before they set a thread default. The new test an_event_from_a_callsite_another_thread_met_first_is_counted makes another thread meet a callsite first, and it counts 0 events without the global subscriber.
#487 gives TransactionConflictException and ServiceUnavailable the BatchExecuteStatement entry measured for a contended statement: Code TransactionConflict, the message "Transaction is ongoing for the item" and no TableName. batch_code gave the first TransactionConflict with the error's own message and TableName, and the second InternalServerError. Once both PRs merge, #487's arm matches first and those two arms are dead. batch_code drops the two arms, so they keep ValidationError until #487 merges. The test drops their rows and the ValidationException row, which main's an_error_of_the_item_operation_names_the_batch_table covers.
…ient The backup mapping passes on the backend's message of TableNotFound, TableAlreadyExists and TableNotActive, and the streams mapping that of TableNotFound. The security model and the storage extension manual now list them with the other variants. ADR-0028 says which BatchExecuteStatement classes keep their listed code, now that #487 maps the contended entry. It also says that the shard lookup mapping checks the shard id length before it delegates, and names no variant of its own.
The None case repeated service_error_log_tests, whose sites() runs the conditional check mapping without ALL_OLD over the conditional check row. The comment on sites() now says that this mapping also maps the engine's own ConditionFailed.
|
Conditional check item outside create_table: fixed in 3bcee8d.
|
demohan
left a comment
There was a problem hiding this comment.
Items 3 and 4 are resolved at ea4efd4, and five BatchExecuteStatement classes carry their codes; the batch deferral is in #536 and two classes are in #487, both still open.
- Every backend-classified error now goes through one mapping that drops the item, and only the conditional check under
ALL_OLDkeeps it, as the service does on PutItem, UpdateItem and DeleteItem withALL_OLDandNONEon SQLite and PostgreSQL. A backend's not-found on the authorization key read counts as a missing table and every other class fails closed: on 12 rows a refused caller gets AccessDenied and an authorized one ResourceNotFound, at this head and on main, on both backends. Putting back the old arm at each site, or treating everyServiceerror as a missing table, fails a test, and the log test, the ADR's count of ten mappers and the two pages match the code. Head answers as main on 46 rows, twice, and engine (898) and server (519) tests pass. - Throttled INSERTs answer
ProvisionedThroughputExceededand a hot keyThrottlingError, each withTableName, as on the service.TransactionConflictExceptionandServiceUnavailablestill answerValidationError; on the service a contended statement answersTransactionConflict, "Transaction is ongoing for the item", withTableName, in 4 samples. is_deferrableandbatch_get_item.rsare unchanged: on the engine's test double a backend throttle in the middle of a batch fails the request with 400 after the first write committed, and the third write is not tried. On the service, 25 large puts on a throttled table answered 200 with 11 and 13 left inUnprocessedItems, and a BatchGetItem of 30 keys at 1 RCU answered 200 with 8 inUnprocessedKeys.
I will approve once the batch defers a throttled request as the service does, here or by #536 landing with this change, and the two classes answer as the service does.
What
StorageErrorgains aService(DynamoDbError)variant, marked#[error(transparent)]. It carries a client error the backend has already classified. Ten engine functions map aStorageErrorto a client error. Five end in a catch-all: the backup mapping inbackup_requests.rs, theUpdateTablemapping, the streams and TTL mappings, andsanitize_storage_error. The last one maps the metadata and tagging paths. The data path mapping increate_table.rsnames every variant. Each of these six gains aServicearm that callscreate_table::service_err_to_dynamo. That function returns the error with its variant and message unchanged and without the fault log line. The other four delegate the rest to one of the six. They are the conditional check mapping, the create-backup and restore mappings, and the shard lookup mapping instreams.rs. The server's authorization read delegates to the data path mapping.The engine keeps one rule for itself, in
service_err_to_dynamo: aConditionalCheckFailedExceptionloses its item, as the engine's ownConditionFaileddoes on the generic path. Only the conditional check mapping returns the item, to a request that setReturnValuesOnConditionCheckFailuretoALL_OLD. The message does not change.In a
BatchExecuteStatementresponse, a statement's entry carries the code that the API Reference lists for the error's class (BatchStatementError). The codes are ProvisionedThroughputExceeded, ThrottlingError, RequestLimitExceeded, ItemCollectionSizeLimitExceeded and InternalServerError. Before this change each of these classes gotValidationError. So did the engine's own internal errors in a batch entry, which now get InternalServerError.TransactionConflictExceptionandServiceUnavailablekeepValidationErrorin this PR. #487 gives them the entry measured for a contended statement. The server reads a table's key schema before the IAM decision. That read treats aServiceerror carryingResourceNotFoundExceptionas a missing table, as it treatsTableNotFound. A caller the IAM decision refuses gets the refusal and not the backend's not-found.The redaction rule for every other variant is unchanged: an
Internalerror is logged at error level and reaches the client as the fixedInternalServerErrortext.The storage design lists the variant beside the redaction rule. The security model's Error Message Security section names it beside the other variants whose message reaches a client as the backend wrote it. The backend author manual's
DataEnginesection says when to return it. RFC-0003 section 9.2 adds the obligation to the error fidelity criteria. RFC-0002 states that variants may be added toStorageErrorin a minor release. ADR-0028 records the decision and the options not taken.Why
A backend that can classify its own failure into the service's error vocabulary had no way to return that error with its own message. An example is a hosted database that reports a documented capacity or unavailability condition. Every unrecognised
StorageErrorreaches the client as the fixedInternal server errorstring after an error-level log line. So the client learns nothing about what to do, and the operator's log counts a documented condition among storage faults.Transientis also redacted, and the in-tree queue workers read it as the retry signal, so it is not a substitute.The doc comment, the design, both manuals and RFC-0003 state the obligation that comes with the variant. The message inside crosses the wire verbatim, so it must be service-shaped text with no driver output, host names, connection strings or credentials. A failure the backend cannot classify stays
Internal. The status code and the body shape still come from theDynamoDbErrorvariant through the one serializer. So a backend cannot produce a status or a shape outside the service's catalog through this variant. No in-tree backend returnsServiceyet.Testing done
One set of rows (
service_error_log_tests::rows) holds five backend-classified errors, each with a message that the engine never writes. Each row holds the body the client gets (error_document). The conditional check row carries an item that the body must not have. The rows run through all ten mappings: seven from the crate root, and the create-backup, restore and shard lookup mappings in their own modules. At the seven, a subscriber also counts error-level log events (tracing-subscriberas a dev-dependency). It counts zero for aServiceerror and one forInternal("driver text"), whose body must be the fixed text. The subscriber is the thread default under a global one with an interest in every callsite (test_tracing). So a callsite that another thread met first still counts.a_backend_conditional_check_error_keeps_its_item_only_under_all_oldcovers theALL_OLDarm.an_error_of_the_item_operation_keeps_the_listed_code_of_its_classhas one row per class thatbatch_codemaps. Twokey_info_for_authztests gain rows for a backend's not-found and for aServicefault.Negative controls ran on a clean committed tree, and I restored each one after:
Service(e) => earm put back at any of the five sites that passed the item fails the rows test at that site.service_err_to_dynamoand 1 in theALL_OLDarm.ALL_OLDarm fails its test.Servicearm instreams.rsfails the rows test with the error logged and redacted.batch_codefails the code table test, and a mutant of its default arm failsan_error_of_the_item_operation_names_the_batch_table.key_info_for_authzarm, its missing-table test fails with the backend's not-found returned.Against
main, the branch adds 8 tests and removes or renames none of main's (test attributes ingit diff a417b2f82: 8 added, 0 removed).Five
backup_storetests of the server crate fail on the test host because another user owns its/tmp. They fail the same way on every branch there, and CI runs them. The no-default-features and Rust 1.91.1 checks ran at 87aa815. The later commits remove two match arms and change tests and docs only.Changes since the 24 November review
origin/mainat a417b2f (feat(wasm): [Add WebAssembly browser support for ExtendDB #1009, UpdateExpression ADD creates no missing map on its path #596, fix(storage-cassandra): extenddb destroy removes only a deployment's own keyspaces #1173). The backup mapping moved with feat(wasm): [Add WebAssembly browser support for ExtendDB #1009 tocrates/engine/src/backup_requests.rs. This PR'sServicearm is there now.create_table::service_err_to_dynamo, and everyServicearm calls it. One set of rows (service_error_log_tests::rows) replaces the per-site tests, each with a backend message the engine never writes.BatchExecuteStatemententry keep the listed code of its error class (batch_code).Service(ResourceNotFoundException)on the authorization key read asTableNotFound. Every otherServiceclass fails closed with its own class.InterestedInEveryCallsitemoves tocrates/engine/src/test_tracing.rs.TransactionConflictExceptionandServiceUnavailableto fix(mongodb): retry an unconditional PutItem that conflicts on a GSI table #487, which gives them the entry measured for a contended statement.TableNotFoundin the backup and streams mappings, and ofTableAlreadyExistsandTableNotActivein the backup mapping. It also changes two sentences of ADR-0028.ALL_OLDcase in the conditional check test, because the rows test covers the other case.Other open PRs:
StatementError::from_error. The two PRs conflict as text incrates/engine/src/partiql/common.rsandcrates/engine/src/partiql/common/tests.rs. The PR that merges second keeps fix(mongodb): retry an unconditional PutItem that conflicts on a GSI table #487's arm, then this PR's comment above the default arm, and the tests of both.Checklist
cargo test --workspace --lib; the integration suites run in CI)cargo fmt --check)cargo clippy --all-targets -- -D warnings)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:
docs/adr/0028-backend-classified-client-error.md; RFC-0003 section 9.2 and RFC-0002 (release model) updated in this PR.Breaking changes
None for the wire protocol or any in-tree backend.
StorageErrorgains a variant: a backend crate outside this workspace that matches on it exhaustively needs a catch-all arm, which RFC-0002 now states as the policy for minor releases.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.