Repository navigation
Conversation
chihsuan
reviewed
Aug 12, 2026
| responseContext.setEntityStream(new WrappedOutputStream(out) { | ||
| @Override | ||
| public void close() throws IOException { | ||
| super.close(); |
Member
There was a problem hiding this comment.
If super.close() throws, the decrement is skipped, and the gauge remains permanently inflated. Should the decrement run in a finally block?
| requestContext.removeProperty(COUNTED_METRICS); | ||
| final S3GatewayMetrics metrics = (S3GatewayMetrics) counted; | ||
|
|
||
| if (isStreamingGetObject(requestContext)) { |
Member
There was a problem hiding this comment.
I think some GetObject responses, such as 304 Not Modified, have no response body. Since there is no body to stream, Jersey does not close this wrapped stream, and the pending count is never decremented.
Would it make sense to decrement immediately when the response has no entity?
Russole
self-requested a review
September 14, 2026 15:54
rich7420
marked this pull request as draft
October 17, 2026 12:09
rich7420
marked this pull request as ready for review
October 17, 2026 12:30
Contributor
|
Thanks for the patch. I would like to defer merging this after #11735, which will (hopefully) allow skipping most integration tests for S3-only changes. |
Contributor
Author
|
@adoroszlai sure, thanks! |
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.
What changes were proposed in this pull request?
Add a gateway-wide
pendingOperationsgauge to track S3 operations being processed. Requests are counted when the post-matching filter runs and released exactly once when Jersey finishes processing the response, including streaming and error responses. Requests rejected before the filter runs are excluded.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10362
How was this patch tested?
verifyfor S3 Gateway and its dependencies: 106 related tests passed, including 16 Jersey lifecycle cases and dependency analysis.