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

Clean up discarded response message content on the service side #2671

Merged
merged 11 commits into from
Aug 21, 2023

Conversation

daschl
Copy link
Contributor

@daschl daschl commented Aug 11, 2023

No description provided.

@Override
public void onExchangeFinally() {
if (requestMetaData != null && responseMetaData != null) {
Boolean subscribed = requestMetaData.context().get(payloadSubscribedKey);
Copy link
Member

Choose a reason for hiding this comment

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

if a retry occurs the request context map state will be shared, do we reset this state anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great question. Can you help me understand / simulate a case where a retry would happen on the Service side during the response flow in the filters?

I added a test for a pure "error" case as well, but I think what you are suggesting is slightly different.

Copy link
Member

Choose a reason for hiding this comment

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

ah server side retries are less likely but in principal could be done by inserting a filter that has a fallback to in-memory publisher if failure occurs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a test in the latest changeset.

Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Approach lgtm, my comments only for details of the impl:

@daschl daschl changed the title WIP: (service) Clean up discarded payload buffers Clean up discarded response message content on the service side Aug 16, 2023
@daschl daschl marked this pull request as ready for review August 16, 2023 12:16
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

LGTM after the last comments:

Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Thank you!

@daschl daschl merged commit ebd5116 into apple:main Aug 21, 2023
15 checks passed
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.

None yet

3 participants