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

Unit test for removing callback severance on 5-to-3 adapter #553

Merged
merged 9 commits into from
Oct 25, 2023

Conversation

xiazhvera
Copy link
Contributor

Issue #, if available:

Description of changes:

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

@xiazhvera xiazhvera marked this pull request as draft October 9, 2023 23:08
@xiazhvera xiazhvera marked this pull request as ready for review October 10, 2023 20:58
Comment on lines +3207 to +3208
// If the incomplete operation callback was not called, there would be a memory leak as the callback data was not
// released
Copy link
Contributor

@sfod sfod Oct 25, 2023

Choose a reason for hiding this comment

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

Debatable: Maybe pass to Publish operation a callback which will set flag, something like is_callback_called. Then if callback is not called, we have a clear ASSERT statement indicating what the exact problem is. Currently, you have to go to this code and read this comment to figure out why memory leak appeared.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thinking about it, we actually could not find a good timing to validate the is_callback_called flag, because we do not know when does the callback is called during the termination process.

@xiazhvera xiazhvera merged commit f098dcb into main Oct 25, 2023
54 checks passed
@xiazhvera xiazhvera deleted the adapter_test branch October 25, 2023 20:19
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