Tencent / TSW

Tencent Server Web
https://tswjs.org/
Other
1.81k stars 184 forks source link

fix(domain): 清理domain的时候,移除挂载在domain的context #554

Closed RobinzZH closed 1 year ago

RobinzZH commented 1 year ago

"nodejs里面EventEmitter初始化的时候,都会把当前的domain存下来。然后tsw里面又把整个请求的抓包存在domain.currentContext. 而数据库的PoolConnection类型又是继承EventEmitter的,Connection会一直存在,所以内存里就会一直有最初启动的几条流水线日志抓包。"

codecov[bot] commented 1 year ago

Codecov Report

Merging #554 (29f0716) into master (8dcddc7) will increase coverage by 0.46%. Report is 3 commits behind head on master. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #554      +/-   ##
==========================================
+ Coverage   90.42%   90.89%   +0.46%     
==========================================
  Files          21       21              
  Lines         679      681       +2     
  Branches      112      119       +7     
==========================================
+ Hits          614      619       +5     
+ Misses         64       61       -3     
  Partials        1        1              
Files Changed Coverage Δ
lib/core/runtime/create-server.hack.ts 96.72% <100.00%> (+0.05%) :arrow_up:

... and 2 files with indirect coverage changes

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 2.6.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: