Merged
Conversation
56d3d6e to
b8afff0
Compare
ravicious
approved these changes
Aug 26, 2024
c76b0ef to
4d5631f
Compare
Contributor
|
/excludeflake * |
rosstimothy
approved these changes
Aug 28, 2024
88231e1 to
1590d87
Compare
|
@fspmarshall See the table below for backport results.
|
This was referenced Aug 29, 2024
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.
Fixes an issue where session recording could become corrupted during multipart upload if two conditions were met simultaneously:
In this case, the slice would have its
reader()method called multiple times. Thereader()method determines the length of the slice based on the length of the underlying buffer and appends padding as needed, noting the length of the payload and length of the padding in the slice header. On subsequent calls toreader()this logic would be re-run and would count the padding bytes as part of the payload, resulting in corruption of the header and preventing the session recording from being read. Attempts to read the session recording would fail with the errorgzip: invalid header.This PR updates the multipart upload logic to prevent this condition from being hit, and updates the session recording read logic to be able to read existing corrupted sessions. Test coverage has been added to catch future issues with paddings/retry conditions (neither of which were properly covered), and the test coverage has been added to the reader to ensure it can decode a fake corrupted session that was generated manually using some of our existing session recording test utilities (
lib/events/testdata/corrupted-session).This issue is loosely related to #45877 as the two issues tend to happen together since they are both triggered when the session recording system is under extremely high load.
changelog: fixed an issue where attempts to play/export certain session recordings would fail with
gzip: invalid header.