Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add DeleteStreamsForSessionAsync to ISseEventStreamStore

Đang mở
#1,287 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu từ ISseEventStreamStore và theo dõi các triển khai cũng như các bên gọi nó, đặc biệt là việc kết thúc phiên thông qua RunSessionHandler. Thêm thao tác xóa bất đồng bộ được yêu cầu và xác minh rằng tất cả các stream cùng các sự kiện liên quan của phiên đã cho đều được xóa, với hỗ trợ hủy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement P3 ready for work

Is your feature request related to a problem? Please describe.

When an MCP session ends, the SSE event streams stored by ISseEventStreamStore for that session are not proactively cleaned up. They persist until cache expiration removes them. This wastes storage, especially in high-throughput scenarios with many short-lived sessions.

Describe the solution you'd like

Add a DeleteStreamsForSessionAsync(string sessionId, CancellationToken) method to ISseEventStreamStore that deletes all stored streams and their associated events for a given session.

Describe alternatives you've considered

An alternative is to rely solely on cache expiration to keep resource consumption low. Since it is relatively easy to catch session terminations (with RunSessionHandler), it seems reasonable to provide a means to delete the streams for this session since they are known to be no longer needed.

Additional context

Ngôn ngữ chính
C#
Star
4.5k
Fork
814
Merge trung bình
9 ngày 19 giờ
Pull request đã merge (30 ngày)
4

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/csharp-sdk

Tất cả issue của modelcontextprotocol/csharp-sdk

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.