[2.0.4] An action started from a cleanup that only waits holds back a later, unrelated action's writes
メンテナーはふだん 1 日以内に返信
@yumemi-thomas がすでに取り組んでいます。
2026年11月27日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- frontend, performance
調査の方向性
Start with core/scheduler.ts, especially the logic that clears flushTransaction after a transaction queues no writes, then reproduce with the linked Solid playground using the provided wait, bump, and cleanup flow. The bug is done when bump() commits its signal update immediately even while wait() remains suspended, without regressing the related cleanup case in #5242.
索引モデルが issue の本文から書いたものです。
説明
A cleanup starts an action that writes nothing and just waits. While it waits, an unrelated action sets a signal and ends. That write should show right after, but it stays hidden until the cleanup's action ends. Started outside a cleanup, the same waiting action doesn't hold anything back.
Reproduction
Open in the Solid playground (2.0.4)
import { createSignal, createEffect, action, Show } from "solid-js";
// Writes nothing; waits until "3. finish" is clicked.
let release: (() => void) | undefined;
const wait = action(function* () {
yield new Promise<void>(r => (release = r));
});
function Panel() {
createEffect(
() => 1,
() => () => void wait() // the effect's cleanup starts the waiting action
);
return <p>panel is open</p>;
}
export default function App() {
const [open, setOpen] = createSignal(true);
const [count, setCount] = createSignal(0);
const close = action(function* () {
setOpen(false);
});
const bump = action(function* () {
setCount(2); // unrelated to `wait`
});
return (
<>
<button onClick={() => close()}>1. close panel</button>
<button onClick={() => bump()}>2. set count to 2</button>
<button onClick={() => release?.()}>3. finish</button>
<Show when={open()}>
<Panel />
</Show>
<p>count: {count()}</p>
</>
);
}
Steps
- Click 1. close panel. The cleanup starts
wait(). - Click 2. set count to 2.
- Click 3. finish.
Expected
count: 2 after step 2. bump and wait share nothing, so bump commits on its own (D-4, D-9).
Actual
count: 0 after step 2, and count: 2 only after step 3. If the promise never settles, count never shows 2. Calling wait() from the close button instead of the cleanup gives count: 2 after step 2.
Same in 2.0.3, 2.0.4 and main (510bb8d01), dev and prod.
Cause
The cleanup runs while the closing action lands, and wait() opens a transaction that stays open because it yields. It queued no writes, so the flush ends without clearing flushTransaction (core/scheduler.ts), and the waiting action stays the current transaction. bump() joins it instead of opening its own, so its write waits for wait.
Similar to #3141 (fixed in #3145) but through a cleanup. #5242 covers the case where the cleanup's action writes an optimistic value, not this one.
- 主要言語
- TypeScript
- スター
- 37k
- フォーク
- 1.2k
- 平均マージ
- 8時間 43分
- マージ済み PR(30日)
- 365
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/solid のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
[2.0.4] Nested `<Errored>`: the outer boundary stays on an error the inner one rethrew, after the next error is one the inner one handles対応中かも @MilindChatrabhuji が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
activepieces/activepieces#17974 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
OHDSI/Data2Evidence#3777 ·
メンテナーはふだん 3 日以内に返信
-
bug enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AOSSIE-Org/PictoPy#1802 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Termix-SSH/Plugin-Snippets#26 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-reported bug from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nightly-labs/openbot#20504 ·
メンテナーはふだん 1 日以内に返信