Deux cuisiniers écrivent sur la même ardoiseUn contrôle sûr en exécution sérielle a corrompu son état en exécution parallèleTwo cooks share a single slateA check that was safe when runs were serial corrupted its state once runs overlapped
Au passe, une seule ardoise sert à noter la table et le plat en cours. Seul, chaque cuisinier retrouve toujours sa ligne. Dès qu’ils écrivent à deux, leurs notes se croisent. Une assiette part alors à la mauvaise table.Un contrôle conservait, pour chaque exécution, les conditions d’environnement et les données du problème dans des champs ordinaires d’une instance unique. Sous exécution parallèle, deux exécutions partageaient cette instance et pouvaient s’écraser mutuellement. Des sorties ont pu être enregistrées sous le mauvais dossier de problème.One slate at the pass records the table and dish being prepared. Alone, each cook always finds his own line. With two writers, their notes cross. A plate then leaves for the wrong table.A check stored per-run environment conditions and problem data in ordinary fields on a single shared instance. Once runs overlapped, two of them shared that instance and could overwrite each other’s values. Outputs could be recorded against the wrong problem directory.
Les plans de travailIsolation et concurrenceThe worktopsIsolation and concurrencyDeux commis écrivent sur la même ardoiseChronologieTwo cooks write on the same slateTimeline
Avec un seul commis au passe, l’ardoise ne porte qu’une commande. Elle reste donc toujours juste.En exécution sérielle, le contrôle fonctionnait correctement : une seule exécution vivait à la fois.With one cook at the pass, the slate carries one order. It therefore always stays correct.Run one at a time and the check behaved correctly; only one run was ever live.
Quand les commandes partent ensemble, plusieurs commis travaillent à la fois. Ils gardent pourtant une seule ardoise commune.Le mode par lots a introduit plusieurs exécutions concurrentes partageant la même instance de contrôle.When orders run together, several cooks work at once. They still share a single slate.Batch mode introduced several concurrent runs sharing one control instance.
Le deuxième commis remplace la commande inscrite. Le premier prépare pourtant encore la sienne.Une exécution pouvait réécrire les champs partagés pendant qu’une autre était encore en cours.The second cook replaces the written order. The first is still preparing his own.One run could rewrite the shared fields while another was still in flight.
Le premier plat arrive au passe. La dernière ligne est relue, puis l’assiette part à la mauvaise table.Au moment d’enregistrer un résultat, le contrôle relisait ces champs et pouvait l’attribuer au mauvais dossier de problème.The first plate reaches the pass. The newest line is read, and the dish goes to the wrong table.At write time the control re-read those fields and could file a result under the wrong problem directory.
La réparation donne une ardoise séparée à chaque commis. La brigade rejoue ensuite volontairement deux commandes en même temps.Le correctif a déplacé l’état par exécution vers un stockage propre au thread, avec un test de régression déterministe à deux exécutions.The repair gives each cook a separate slate. The brigade then deliberately stages two orders at once.The fix moved per-run state into thread-local storage and added a deterministic two-worker regression test.
La brigade grandit, l’unique ardoise resteMécanismeThe brigade grows but the slate stays singleMechanism
L’ardoise convenait tant qu’un seul commis écrivait. La maison a ajouté des mains sans ajouter de tableaux. Dès lors, la ligne visible pouvait appartenir à une autre commande.L’objet de contrôle était traité comme si sa durée de vie coïncidait avec une exécution unique. Le passage au parallèle a changé le modèle de propriété sans que le modèle de stockage suive. Les champs sont restés communs alors que leur contenu était devenu propre à chaque exécution.The slate worked while one cook wrote on it. The house added hands without adding boards, so the visible line could now belong to another order.The control object was treated as though its lifetime matched a single run. Parallelism changed the ownership model while the storage model stayed where it was. The fields remained common after their contents had become private to each run.
Une ardoise par commis, puis deux commandes à la foisRéponseGive each cook a slate, then stage the rushResponse
Chaque commis reçoit un tableau portant sa propre commande. Pour vérifier la séparation, la brigade lance exprès deux préparations au même instant au lieu d’attendre le prochain coup de feu.L’état par exécution doit être isolé par tâche, par thread, par contexte asynchrone ou par identité d’exécution explicite, jamais par un champ partagé. Les défauts de concurrence exigent des tests déterministes à barrières, et non un entrelacement laissé au hasard.Each cook gets a board carrying only his order. To check the separation, the brigade deliberately starts two preparations together instead of waiting for the next rush.Per-run state belongs to a task, a thread, an async context or an explicit run identity — never to a shared field. Concurrency defects need barrier-based deterministic tests rather than hoped-for interleavings.
La faute attend que deux craies bougent ensembleÉtat actuelThe fault waits for two pieces of chalk to moveCurrent state
Avant d’ajouter un second commis à un passe ancien, il faut chercher tout ce qu’ils partageront. L’ardoise paraît sûre jusqu’au soir où deux commandes se chevauchent.Le cas sert d’avertissement canonique à tout système qui ajoute des exécutions parallèles à des contrôles écrits pour l’exécution sérielle.Before adding a second cook to an old pass, look for everything they will share. The slate appears safe until two orders overlap.The case stands as a canonical warning for any system adding parallel runs on top of controls written for serial execution.
Une ligne commune n’appartient plus à aucune commandeLeçonA shared line no longer belongs to one orderLesson
Dès que deux commis utilisent le même tableau, la dernière ligne peut remplacer la première. Chaque commande doit garder sa propre ardoise.Un état de contrôle partagé devient un risque de corruption partagé dès la première exécution concurrente.When two cooks use one board, the newest line can replace the first. Every order needs its own slate.Shared control state becomes shared corruption risk the moment two runs overlap.

