Handle unprocessed deletes without throwing an IllegalArgumentException #187
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.
I started running into exceptions that looked like the following:
unprocessedDeleteItemsForTable
returnsKey
, but line 308 tries to callrawItemKey()
on it and chokes. The net result is that tempest can't handle unprocessed deletes. Removing the unnecessary conversion should resolve it.I couldn't see a way to verify that this would solve the problem, as there don't seem to be any tests around
unprocessedDeletes
. I tried a similar approach to my test here, but there's no way to delete more than 16MB. There's a max of 25 items, and each one can be 400KB. If each one is as big as possible, you only hit 10MB. Without mocking the dynamo client, there's no way to trigger a failure here.The easiest way to test this is probably to expose the
toBatchWriteResponse
as aninternal
function and unit test it - there isn't an existing practice of that in this project so I was hesitant to do so. Let me know if you'd like a test added that follows that approach.