fix(dynamodb-enhanced): return DELETE_TABLE from DeleteTableOperation#operationName()#6799
Open
anuq wants to merge 2 commits intoaws:masterfrom
Open
fix(dynamodb-enhanced): return DELETE_TABLE from DeleteTableOperation#operationName()#6799anuq wants to merge 2 commits intoaws:masterfrom
anuq wants to merge 2 commits intoaws:masterfrom
Conversation
…batch requests When a request has an overrideConfiguration, getBatchKey() returns queueUrl + overrideConfig.hashCode() as a composite key to correctly group requests for batching. However, createXxxBatchRequest() was passing this composite key as the QueueUrl in the actual SQS API call, producing a non-existent URL like: https://sqs.us-west-2.amazonaws.com/123/my-queue-461286369 This causes QueueDoesNotExistException for any caller that sets an overrideConfiguration on their request (e.g. the SQS extended client library which appends a user-agent via overrideConfiguration). Fix: extract queueUrl from the first request in the batch (safe because all requests in a batch share the same queueUrl by grouping invariant) and use that for the QueueUrl field in the batch API call. Affected: SendMessageBatchManager, DeleteMessageBatchManager, ChangeMessageVisibilityBatchManager. Fixes aws#6478
…#operationName() DeleteTableOperation#operationName() was incorrectly returning OperationName.DELETE_ITEM. Any instrumentation, metrics, or extension hooks that key off OperationName would therefore see a DeleteTable request misclassified as a DeleteItem operation. Fixes aws#6760
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #6760
DeleteTableOperation#operationName()was returningOperationName.DELETE_ITEMinstead ofOperationName.DELETE_TABLE. Any instrumentation, metrics, or extension hooks that key offOperationNamewould therefore misclassify a DeleteTable request as a DeleteItem operation.Fix
Change the return value from
OperationName.DELETE_ITEMtoOperationName.DELETE_TABLE(one-line change).Testing
Added
operationName_returnsDeleteTabletest toDeleteTableOperationTestthat verifies the correctOperationNameis returned.Checklist
#6760)./mvnw packagesucceeds