Commit 3bbe2d1
committed
[Bugfix] Fix memory leak and broken metrics in UCMBlendConnector
Two functional bugs in the blend connector:
1. Memory leak: requests_blend_meta is never cleaned up for finished
requests. build_connector_meta pops from self.requests_meta but
not from self.requests_blend_meta, causing unbounded growth
proportional to the total number of completed requests. Each entry
holds BlendRequestMeta with block hashes and chunk metadata, so
this is not trivial in long-running serving scenarios.
2. Broken metrics: self.monitor.update_stats() references an undefined
attribute. The parent class UCMDirectConnector uses the module-level
ucmmetrics.update_stats() API, but the blend connector calls
self.monitor which does not exist, causing AttributeError on any
blend request with metrics enabled.
Signed-off-by: supermario_leo <leo.stack@outlook.com>1 parent f531458 commit 3bbe2d1
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
384 | | - | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
0 commit comments