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

Expose FlushAndTearDown API in C-API #1198

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Expose FlushAndTearDown API in C-API #1198

merged 2 commits into from
Aug 31, 2023

Conversation

shivpratap1992
Copy link
Contributor

No description provided.

@shivpratap1992 shivpratap1992 changed the title Expose C-API Expose FlushAndTearDown API in C-API Aug 31, 2023
@shivpratap1992 shivpratap1992 marked this pull request as ready for review August 31, 2023 03:57
lib/include/public/mat.h Outdated Show resolved Hide resolved
@lalitb
Copy link
Contributor

lalitb commented Aug 31, 2023

Can you also add a unit test at:

TEST(APITest, C_API_Test)

Basically calling this API just before evt_close atleast to ensure there is no crash from the API.

Copy link
Contributor

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks.

@shivpratap1992 shivpratap1992 merged commit 02c276d into main Aug 31, 2023
19 of 20 checks passed
@shivpratap1992 shivpratap1992 deleted the users/ssingh/tear branch August 31, 2023 16:55
@maxgolov
Copy link
Contributor

maxgolov commented Sep 13, 2023

@shivpratap1992 @lalitb

I think this fix is doing something wrong : evt_close does ref-counting and performs FlushAndTeardown when necessary, when the last instance is gone. In host-guest scenarios, when two entities are anchored to the same LogManager instance - allowing one of them to explicitly destroy the LogManager via FlushAndTeardown may lead to catastrophic results. For example, in case if guest calls the teardown C API before host app.

Was there an issue with evt_close not properly invoking the teardown sequence?

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