Skip to content

fix(pipeline): stop idle L2 cold-start polling#193

Open
RerankerGuo wants to merge 1 commit into
TencentCloud:mainfrom
RerankerGuo:fix/idle-l2-cold-start-polling
Open

fix(pipeline): stop idle L2 cold-start polling#193
RerankerGuo wants to merge 1 commit into
TencentCloud:mainfrom
RerankerGuo:fix/idle-l2-cold-start-polling

Conversation

@RerankerGuo

Copy link
Copy Markdown

Description | 描述

Reduce idle L2 cold-start polling when a session has no L1 cursor yet.

When the first L2 run skips because no records are available, the scheduler still keeps one maxInterval retry so delayed L1 writes can be picked up. If that follow-up retry also skips and no cursor has been established, the scheduler stops re-arming the periodic L2 timer for that idle session. The next L1 completion re-arms L2 normally.

This avoids repeated empty SQLite scans for idle sessions while preserving the delayed retry path after new L1 activity.

Related Issue | 关联 Issue

Fix #155

Change Type | 修改类型

  • Bug fix | Bug 修复
  • New feature | 新功能
  • Documentation update | 文档更新
  • Code optimization | 代码优化

Self-test Checklist | 自测清单

  • Verified locally | 本地验证通过
  • No existing features affected | 无影响现有功能

Additional Notes | 其他说明

Verified with npm test and npm run build using Node v24.15.0.

Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Reducing idle SQLite polling is a meaningful performance improvement. The delayed retry path after L1 activity is well thought out. We'll take a look and provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Main thread CPU pinning at 100%: aggressive SQLite polling in memory-tdai pipeline

2 participants