ROBUSTNESS: Protect against user interrupts for calls that need to be atomic
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 20/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- r
- Domaine
- distributed-systems
Piste de recherche
Commencez par examiner le chemin .onLoad() du package et la communication entre le processus principal et les workers de cluster-future mentionnée dans l’issue. Identifiez les appels qui doivent rester atomiques, puis déterminez comment suspendInterrupts(expr), l’option future.onInterrupts et R_FUTURE_ONINTERRUPTS devraient s’appliquer, y compris dans les sessions interactives et avec un moyen de vérifier le comportement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- R
- Étoiles
- 1k
- Forks
- 93
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de futureverse/future
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
futureverse/future#852 · 1 commentaire ·
-
Change repository description?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 35/100
futureverse/future#849 ·
-
Entire global environment getting passed along with user-defined (global) functions in shinyOuvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
futureverse/future#833 ·
-
feature/resources RNG
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
futureverse/future#832 ·
-
RNG
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 38/100
futureverse/future#831 · 1 commentaire ·
Toutes les issues de futureverse/future
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
nf-core/provenancereport#75 ·
-
Typo in Exercise 5.22?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
garner-code/PsyR#80 ·