Skip to content

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
@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
@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.

4 participants