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

Avoid writer reinitialization during shutdown #1248

Merged
merged 1 commit into from
Nov 17, 2020
Merged

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Nov 16, 2020

Fixes #1235

Changes introduced in release 0.38.0 (#1091) allowed the internal worker instance, held by the Writer, to be restarted on demand. This is normally ok, except during a shutdown.

With the introduction of #1177, in release 0.41.0, the issue has change, as a brand new Writer is now created. That new Writer is then fed a trace, which triggers the lazy initialization of it's internal worker thread.

This PR prevents the re-creation of components during shutdown, the most relevant one being the Writer.

Components are still responsive to method calls after Datadog.shutdown! (as to not surface host application errors), but they might not perform their work internally after their resources have been disposed of (e.g. Writer will not flush any traces after its internal worker thread has been stopped).

@marcotc marcotc added bug Involves a bug core Involves Datadog core libraries labels Nov 16, 2020
@marcotc marcotc requested a review from a team November 16, 2020 21:03
@marcotc marcotc self-assigned this Nov 16, 2020
@marcotc marcotc added this to the 0.43.0 milestone Nov 16, 2020
Copy link
Contributor

@ericmustin ericmustin left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault on exit while tracing mongodb
2 participants