fix(WorkflowExecutionService): shutdown console writer thread on unsubscribe - #7914
fix(WorkflowExecutionService): shutdown console writer thread on unsubscribe#7914VuMartin wants to merge 3 commits into
Conversation
Automated Reviewer SuggestionsBased on the
|
Backport auto-label reportThis
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 367 | 0.224 | 25,757/35,421/35,421 us | 🟢 -8.3% / 🔴 +147.1% |
| 🔴 | bs=100 sw=10 sl=64 | 798 | 0.487 | 122,402/161,127/161,127 us | 🔴 +18.4% / 🔴 +62.0% |
| ⚪ | bs=1000 sw=10 sl=64 | 910 | 0.556 | 1,097,954/1,174,433/1,174,433 us | ⚪ within ±5% / 🔴 +22.5% |
Baseline details
Latest main 84e2d7d from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 367 tuples/sec | 391 tuples/sec | 833.1 tuples/sec | -6.1% | -55.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.224 MB/s | 0.239 MB/s | 0.508 MB/s | -6.3% | -55.9% |
| bs=10 sw=10 sl=64 | p50 | 25,757 us | 24,389 us | 11,860 us | +5.6% | +117.2% |
| bs=10 sw=10 sl=64 | p95 | 35,421 us | 38,643 us | 14,334 us | -8.3% | +147.1% |
| bs=10 sw=10 sl=64 | p99 | 35,421 us | 38,643 us | 18,194 us | -8.3% | +94.7% |
| bs=100 sw=10 sl=64 | throughput | 798 tuples/sec | 832 tuples/sec | 1,085 tuples/sec | -4.1% | -26.5% |
| bs=100 sw=10 sl=64 | MB/s | 0.487 MB/s | 0.508 MB/s | 0.662 MB/s | -4.1% | -26.5% |
| bs=100 sw=10 sl=64 | p50 | 122,402 us | 120,405 us | 92,973 us | +1.7% | +31.7% |
| bs=100 sw=10 sl=64 | p95 | 161,127 us | 136,095 us | 99,460 us | +18.4% | +62.0% |
| bs=100 sw=10 sl=64 | p99 | 161,127 us | 136,095 us | 107,737 us | +18.4% | +49.6% |
| bs=1000 sw=10 sl=64 | throughput | 910 tuples/sec | 924 tuples/sec | 1,111 tuples/sec | -1.5% | -18.1% |
| bs=1000 sw=10 sl=64 | MB/s | 0.556 MB/s | 0.564 MB/s | 0.678 MB/s | -1.4% | -18.0% |
| bs=1000 sw=10 sl=64 | p50 | 1,097,954 us | 1,079,444 us | 915,816 us | +1.7% | +19.9% |
| bs=1000 sw=10 sl=64 | p95 | 1,174,433 us | 1,129,274 us | 959,066 us | +4.0% | +22.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,174,433 us | 1,129,274 us | 993,644 us | +4.0% | +18.2% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,545.57,200,128000,367,0.224,25757.10,35420.89,35420.89
1,100,10,64,20,2506.24,2000,1280000,798,0.487,122401.78,161126.70,161126.70
2,1000,10,64,20,21972.91,20000,12800000,910,0.556,1097953.94,1174433.04,1174433.04
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7914 +/- ##
============================================
+ Coverage 91.53% 91.92% +0.39%
- Complexity 4471 4569 +98
============================================
Files 1172 1170 -2
Lines 47311 47339 +28
Branches 5305 5302 -3
============================================
+ Hits 43305 43516 +211
+ Misses 2348 2200 -148
+ Partials 1658 1623 -35
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changes were proposed in this PR?
Fixes a console writer thread leak in
ExecutionConsoleService.The console writer executor was not being shut down when an execution service was unsubscribed. This could leave
texera-console-writerthreads alive after workflow execution finished.Before:

After:

This PR:
unsubscribeAll().shutdownNow()if necessary.Any related issues, documentation, discussions?
Fixes #7455
How was this PR tested?
Ran:
Manual testing:
Ran workflows multiple times and checked the console writer threads with:
Verified that the console writer threads are terminated after workflow execution completes and unsubscribeAll() is called.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: ChatGPT (5.5 mini)