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.
With shard mapping and the KPL architecture not implemented, user records are potentially already being aggregated to the wrong shards. However, it would still be nice to retain the original user records' partition keys so that on the consumer side we could expect the documented aggregation format.
I also fixed a bug where we were miscalculating the record size. In edge cases that are easier to reproduce with small user records, I was seeing the following error:
Following the discussion on this issue: awslabs/kinesis-aggregation#30 I found that we aren't taking into account the size of the protobuf wire type. See Node.js aggregation library for example: https://github.com/awslabs/kinesis-aggregation/blob/master/node/lib/kpl-agg.js#L60.