-
-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge frames in deserialize_bytes
#3639
Merged
Merged
Commits on Jun 4, 2020
-
Test byte serialization in frame splitting case
In some cases where the frames are particularly large, we may opt to split them into smaller frames. This may be due to performance reasons when transmitting data or it may be due to limitations like those of compressors used to compact frames. So include a test case that we know will get split to make sure it is handled correctly. Or at least make sure we are catching errors that would cause it to be mishandled.
Configuration menu - View commit details
-
Copy full SHA for 33f197f - Browse repository at this point
Copy the full SHA 33f197fView commit details -
Merge frames in
deserialize_bytes
It appears that we are splitting frames in `serialize_byteslist` so that we can compress them. However we are not merging them back together afterwards during deserialization. This can cause an exception to be raised by serializers that expected their frames to be structured in a particular way. To fix this, we make sure to call `merge_frames` after `decompress` in `deserialize_bytes`. Further we make sure to pack the `lengths` of the original `frames` in the `header` (if not already present) in `serialize_byteslist`. This should ensure deserializers get the original frame structuring back when they operate on them.
Configuration menu - View commit details
-
Copy full SHA for 33594d3 - Browse repository at this point
Copy the full SHA 33594d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59afbde - Browse repository at this point
Copy the full SHA 59afbdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ab510f - Browse repository at this point
Copy the full SHA 9ab510fView commit details -
As using the `bytes` constructor will cause a copy (even if it is provided a `bytes` object), special case handling a `bytes` object and just return.
Configuration menu - View commit details
-
Copy full SHA for f688b21 - Browse repository at this point
Copy the full SHA f688b21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 198f81f - Browse repository at this point
Copy the full SHA 198f81fView commit details
Commits on Jun 5, 2020
-
Drop fast-path for single frame
This is already handled in the check above.
Configuration menu - View commit details
-
Copy full SHA for 3b14b99 - Browse repository at this point
Copy the full SHA 3b14b99View commit details -
This is already handled by the fast path for more than zero frames.
Configuration menu - View commit details
-
Copy full SHA for eafbf77 - Browse repository at this point
Copy the full SHA eafbf77View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63a2086 - Browse repository at this point
Copy the full SHA 63a2086View commit details
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.