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

オープン
#314 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
database

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
12
フォーク
0
平均マージ
1日 2時間
マージ済み PR(30日)
8

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rstudio/platform-lib のほかの issue

rstudio/platform-lib の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。