Skip to content

introduce max concurrent streams for stream manager#553

Merged
TingDaoK merged 23 commits into
mainfrom
max-streams
Mar 20, 2026
Merged

introduce max concurrent streams for stream manager#553
TingDaoK merged 23 commits into
mainfrom
max-streams

Conversation

@TingDaoK
Copy link
Copy Markdown
Contributor

Issue #, if available:

  • allow stream manager to config max number of streams to be active at the same time.

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 79.16667% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.59%. Comparing base (0d8e1a9) to head (4ab0d80).

Files with missing lines Patch % Lines
source/http2_stream_manager.c 79.16% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
- Coverage   79.76%   79.59%   -0.18%     
==========================================
  Files          28       28              
  Lines       11893    11933      +40     
==========================================
+ Hits         9487     9498      +11     
- Misses       2406     2435      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TingDaoK TingDaoK marked this pull request as ready for review March 18, 2026 23:22
Comment thread include/aws/http/http2_stream_manager.h Outdated
Comment thread source/http2_stream_manager.c Outdated
(void)error;
sm_connection->connection = NULL;
}
AWS_ASSERT(sm_connection->connection != NULL);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is that a hard guarantee that connection will always be non-null?

Copy link
Copy Markdown
Contributor Author

@TingDaoK TingDaoK Mar 20, 2026

Choose a reason for hiding this comment

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

yeah, that's the only place releasing the connection back to the connection manager and setting this to be null, other than the start destroy.

I can create a helper function to make it more clear. It's the helper function to release the connection back to the manager.

Comment thread source/http2_stream_manager.c Outdated
node = aws_linked_list_next(node);

/* Verify this connection has no outstanding streams */
AWS_FATAL_ASSERT(sm_connection->num_streams_assigned == 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this really fatal? can there be any potential case where this occurs in some corner case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not necessary to be fatal, but we should only start to destroy the stream manager when there is no active streams, which is checked before starting the destroy process

@TingDaoK TingDaoK merged commit 91bacad into main Mar 20, 2026
45 checks passed
@TingDaoK TingDaoK deleted the max-streams branch March 20, 2026 22:33
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.

3 participants