DatabaseQueue subscribe/unsubscribe can take the stop signal and hang shutdown

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

Maintainer thường phản hồi trong vòng 2 ngày

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
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
database

Hướng nghiên cứu

Start in pkg/rsqueue/impls/database/queue.go, reading SubscribeOne, Unsubscribe, broadcast(), and the WithDbTx queue-copy path alongside the stop-signal fix in #313. Ensure shutdown cannot lose its signal while an operation is in flight, and that queue copies share the loop's completion signal; verify the stop call completes during concurrent subscribe or unsubscribe.

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

Mô tả

DatabaseQueue in pkg/rsqueue/impls/database/queue.go has the same stop-signal race fixed for the broadcaster in #313. SubscribeOne and Unsubscribe select on stopChan, and so does the queue's own broadcast() loop. The stopper sends one value on that channel, so a subscribe or unsubscribe in flight during shutdown can take it. The loop then never exits and the stop call hangs.

The #313 fix (an internal done channel closed by the loop) doesn't copy over directly, because WithDbTx makes queue copies without stopChan. Those copies need to share the same done channel.

Found while reviewing rstudio/package-manager#21068.

Ngôn ngữ chính
Go
Star
12
Fork
0
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có 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 rstudio/platform-lib

Tất cả issue của rstudio/platform-lib

Issue tương tự

Thêm issue về Go

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.