modelcontextprotocol / modelcontextprotocol/example-remote-server

Session ownership data is never removed from Redis

未关闭
#21 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
TypeScript
星标
80
派生
39
平均合并
43 分钟
30 天内合并 PR
1

描述

Describe the bug
Session ownership data is being stored in redis and don't have TTL or are removed

To Reproduce
Steps to reproduce the behavior:

  1. Create Session
  2. Finish Session
  3. Repeat a big number of times

Expected behavior
Session ownership should be cleaned from Redis when session is finished or after a prudential amount of time

Logs

Additional context
Service is storing session ownership info in redis using session:${sessionId}:owner but this data is not removed when cleaning up the transport data. This can cause a memory leak over time if no clean up mechanism is implemented.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

检查传输数据清理路径和 Redis 键 session:${sessionId}:owner。重现重复创建并完成会话的序列,然后验证会话完成或在定义的时间段后过期时所有权数据会被移除,而不会继续在 Redis 中累积。

由索引模型根据 Issue 内容生成。

评估

技术栈
redis, typescript
领域
backend, databases
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。