Set future state to "failed" on orchestration errors?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
r

調査の方向性

plan(multicore)、future()、result(f)、および Issue に示されている FutureError を使用する multicore の例から始め、その動作を現在の f$state の値と比較します。関連するコンテキストについて Issue #667 を確認し、その後、どのオーケストレーションエラーが回復不能で、どの動作を引き続き再試行可能にすべきかを定義します。完了の条件は、state とその後の result() の動作がその区別に一致することです。

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

説明

For example,

library(future)
plan(multicore)
f <- future(tools::pskill(pid = Sys.getpid()))
r <- result(f)
# Error: Failed to retrieve the result of MulticoreFuture (<none>) from the
# forked worker (on localhost; PID 1136927). Post-mortem diagnostic: No process
# exists with this PID, i.e. the forked localhost worker is no longer alive
> r <- tryCatch(result(f), error = identity)
> class(r)
[1] "FutureError"     "error"           "FutureCondition" "condition"      
> f$state
[1] "running"

Suggestion

When there is a non-recoverable FutureError, set the state of the future to "failed". This can then be used to prevent further attempts to retrieve the result(). OTH, this requires that we know the problem cannot be recovered from. For instance, if it's due to a temporary communication issue, it might work when we call result(f) at a later stage.

See also

This is related to Issue #667.

主要言語
R
スター
1k
フォーク
93
平均マージ
2日 4時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

futureverse/future のほかの issue

futureverse/future の issue をすべて見る

似ている issue

R の issue をもっと見る

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

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