fix(tedious): run BulkLoad row-stream listeners in the registration context#9023
fix(tedious): run BulkLoad row-stream listeners in the registration context#9023BridgeAR wants to merge 1 commit into
Conversation
Overall package sizeSelf size: 6.28 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
BenchmarksBenchmark execution time: 2026-06-22 20:37:21 Comparing candidate commit dee3e82 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1950 metrics, 15 unstable metrics.
|
8a3fb87 to
297c17f
Compare
…ontext Listeners added to bulkLoad.getRowStream() run in the async context that emits the stream event, not the one active when the listener was registered, so a caller's 'finish'/'error'/'data' handler loses the span it was registered under. Bind each caller listener to its registration context. tedious' own internal listeners are attached before getRowStream returns, so only caller listeners are bound. The widened version matrix surfaced two tedious-specific test fixes that ride along: 1. Shard the CI job by major range; installing and testing 19 majors in one job exceeds the step time budget. 2. Gate the getRowStream streaming test below major 13 (deprecated there, removed in 14, and the shared setup rethrows the DeprecationWarning) and call connect() only on tedious >=10, since older majors connect on construction.
efa6763 to
dee3e82
Compare
Summary
A listener added to
bulkLoad.getRowStream()ran in the async context that emits the stream event, not the one active when it was registered, so a caller'sfinish/error/datahandler lost the span it was registered under. Each caller listener is now bound to its registration context (tedious' internal listeners attach beforegetRowStreamreturns, so only caller listeners are bound).Two tedious-specific test adaptations ride along: shard the CI job by major range (19 majors blow the step budget), and gate the
getRowStreamstreaming test below major 13 (deprecated there, removed in 14) while callingconnect()only on>=10.Independent of the resolver rework —
PACKAGE_VERSION_RANGEsharding and the conditional gates run on the current install path; the new majors simply are not exercised until the matrix widens.Test plan
SERVICES=mssql PLUGINS=tediousmatrix is green across all three shards.>=4.2 <13shard.Note
Binding a user listener to its registration context is intrinsically an AsyncLocalStorage operation; a diagnostic channel carries instrumentation events and cannot rebind a foreign listener. The duplicate of this wrap pattern in
ws/electron/ldapjscould later fold into a sharedbindEmitterListenershelper.