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

fix: Background Sender reset on Swoole Fork #2645

Merged
merged 17 commits into from
May 3, 2024
Merged

Conversation

PROFeNoM
Copy link
Contributor

@PROFeNoM PROFeNoM commented Apr 26, 2024

Description

#2636

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@PROFeNoM PROFeNoM self-assigned this Apr 26, 2024
@PROFeNoM PROFeNoM added the 🐛 bug Something isn't working label Apr 26, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 38.02817% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 77.64%. Comparing base (78871c1) to head (02d0ceb).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2645      +/-   ##
============================================
- Coverage     79.35%   77.64%   -1.72%     
- Complexity     2198     2205       +7     
============================================
  Files           199      225      +26     
  Lines         21959    25933    +3974     
  Branches          0      986     +986     
============================================
+ Hits          17426    20136    +2710     
- Misses         4533     5271     +738     
- Partials          0      526     +526     
Flag Coverage Δ
appsec-extension 69.05% <ø> (?)
tracer-extension 78.45% <75.00%> (-0.05%) ⬇️
tracer-php 80.28% <0.00%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
ext/ddtrace.h 62.50% <ø> (ø)
ext/ddtrace_arginfo.h 100.00% <ø> (ø)
ext/handlers_pcntl.c 65.38% <100.00%> (-10.62%) ⬇️
ext/integrations/integrations.c 91.11% <100.00%> (ø)
ext/coms.c 79.61% <50.00%> (-0.09%) ⬇️
ext/ddtrace.c 73.31% <75.00%> (-0.24%) ⬇️
.../DDTrace/Integrations/Swoole/SwooleIntegration.php 0.00% <0.00%> (ø)

... and 32 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78871c1...02d0ceb. Read the comment docs.

@pr-commenter
Copy link

pr-commenter bot commented Apr 29, 2024

Benchmarks

Benchmark execution time: 2024-04-30 15:48:53

Comparing candidate commit 02d0ceb in PR branch alex/experiments/fork with baseline commit 78871c1 in branch master.

Found 1 performance improvements and 1 performance regressions! Performance is the same for 176 metrics, 0 unstable metrics.

scenario:ContextPropagationBench/benchExtractTraceContext128Bit-opcache

  • 🟩 execution_time [-125.311ns; -52.689ns] or [-5.312%; -2.234%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟥 execution_time [+5.628µs; +9.472µs] or [+3.134%; +5.274%]

/**
* @internal
*/
function dd_handle_fork(): void {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we please add no new functions to top-level namespace, but add to DDTrace or DDTrace\Internal as appropriate?

ext/ddtrace.c Outdated
PHP_FUNCTION(dd_handle_fork) {
UNUSED(execute_data);
UNUSED(return_value);
// CHILD PROCESS
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume it's still todo to deduplicate with the code in handlers_pcntl.c?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you exactly mean by "deduplicate"? Do you mean some refactoring duplicated code (using this function in the pcntl code)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, refactoring the common code out into a single function.

@PROFeNoM PROFeNoM marked this pull request as ready for review May 2, 2024 07:35
@PROFeNoM PROFeNoM requested a review from a team as a code owner May 2, 2024 07:35
@PROFeNoM PROFeNoM changed the title fix: BGS on Swoole Fork fix: Background Sender reset on Swoole Fork May 2, 2024
Copy link
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Thanks, looks good :-)

@PROFeNoM PROFeNoM merged commit 8388bc1 into master May 3, 2024
605 of 606 checks passed
@PROFeNoM PROFeNoM deleted the alex/experiments/fork branch May 3, 2024 07:13
@bwoebi bwoebi added this to the 1.0.0 milestone May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants