-
Notifications
You must be signed in to change notification settings - Fork 560
Bisection build: 4.9.1 + writer stop_service join timeout (jointimeout1) #18896
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -503,11 +503,14 @@ def periodic(self): | |
|
|
||
| def _stop_service( | ||
| self, | ||
| timeout: Optional[float] = None, | ||
| timeout: Optional[float] = 0.1, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The main tracer shutdown path still bypasses this default: Useful? React with 👍 / 👎. |
||
| ) -> None: | ||
| # FIXME: don't join() on stop(), let the caller handle this | ||
| super(HTTPWriter, self)._stop_service() | ||
| self.join(timeout=timeout) | ||
| try: | ||
| self.join(timeout=timeout) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For the fork-timeout bisection, this only bounds the join reached through Useful? React with 👍 / 👎. |
||
| except Exception: | ||
| log.error("Join on periodic thread failed", exc_info=True) | ||
|
|
||
| def on_shutdown(self): | ||
| try: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" | |
|
|
||
| [project] | ||
| name = "ddtrace" | ||
| version = "4.9.1" | ||
| version = "4.9.1+jointimeout1" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If this lands on a releasable branch/tag, the local-version marker cannot pass the existing release/tag gates: Useful? React with 👍 / 👎. |
||
| description = "Datadog APM client library" | ||
| readme = "README.md" | ||
| license = { text = "LICENSE.BSD3" } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
HTTPWriter.stop()is called without an explicit timeout, this new default makes shutdown wait only 100ms even though the public shutdown contract treatsNoneas “block until flushing has successfully completed.”PeriodicThread.join(timeout)returns silently on timeout, so for slow agentless/HTTP flushes (for example directAgentlessTraceWriter.stop()orAgentlessTraceWriter.recreate(), which callsself.stop()with no timeout)stop()can mark the service stopped and return whileon_shutdown()is still draining or before the process exits, causing queued traces to be dropped or the old writer to run concurrently with the replacement.Useful? React with 👍 / 👎.