ROBUSTNESS: Protect against user interrupts for calls that need to be atomic
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
まず、パッケージの .onLoad() パスと、issue で言及されている cluster-future のメインワーカー間通信を確認します。アトミックなままにする必要がある呼び出しを特定し、そのうえで suspendInterrupts(expr)、future.onInterrupts オプション、R_FUTURE_ONINTERRUPTS をどのように適用すべきかを、インタラクティブセッションと動作を検証する方法も含めて判断します。
索引モデルが issue の本文から書いたものです。
説明
Background
In interactive R sessions, the user can signal user interrupts by hitting Ctrl-C in the terminal. If this happens while R evaluates a set of R expressions that must all complete or not, there is a risk of breaking the state of a future. In some cases, we can recover from it whereas in others the only solution is to restart R.
Suggestion
In R (>= 3.5.0), we have suspendInterrupts(expr) which suspends user-interrupts with evaluating expression expr.
The first task is to identify places where they can safely protect against user interrupts without risking ending up in a situation where R completely blocks. We can always signal a SIGQUIT (Ctrl-\ in the terminal).
One obvious candidate is for cluster futures in main-worker communication. There should be no need to protect against user-interrupts on the worker's end.
Due to the risk of breaking something, we should probably introduce an R option future.onInterrupts and a corresponding environment variable R_FUTURE_ONINTERRUPTS to allow users/sysadmins to enable or disable this feature. To minimize the introduced overhead from checking these all the time, it's probably better to just do it when the package is loaded, i.e. during .onLoad().
We could start off by enabling these user-interrupt protections only for interactive R sessions.
See also
- 主要言語
- R
- スター
- 1k
- フォーク
- 93
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
futureverse/future のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
futureverse/future#852 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
futureverse/future#849 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
futureverse/future#833 ·
-
feature/resources RNG
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
futureverse/future#832 ·
-
RNG
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
futureverse/future#831 · コメント 1 件 ·
futureverse/future の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nf-core/provenancereport#75 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
garner-code/PsyR#80 ·