Skip to content
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

Fix panic when merging a stalled stream log to an empty LogBuffer #3744

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

Velfi
Copy link
Contributor

@Velfi Velfi commented Jul 8, 2024

Motivation and Context

this fixes an issue submitted by an internal user.

Description

If the first event pushed into the log underlying stalled stream protection, then the log manager would panic. This is because it was expecting to merge the new event in but there was nothing to merge it with.

To fix this, I updated the code to push the event when the log manager is empty, instead of merging it.

Testing

ran existing tests and wrote a new test exercising the previous-panicking code.

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Velfi Velfi requested a review from a team as a code owner July 8, 2024 19:54
@Velfi Velfi requested a review from a team as a code owner July 8, 2024 19:55
Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

github-actions bot commented Jul 8, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@Velfi Velfi enabled auto-merge July 8, 2024 20:54
Copy link

github-actions bot commented Jul 8, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@Velfi Velfi added this pull request to the merge queue Jul 8, 2024
Merged via the queue into main with commit 0c72716 Jul 8, 2024
44 checks passed
@Velfi Velfi deleted the zhessler-fix-stalled-stream-protection-early-log-panic branch July 8, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants