fix: cleanRemoteNotesのDELETEにローカルstatement_timeoutを適用#17306
Closed
pooza wants to merge 503 commits intomisskey-dev:developfrom
Closed
fix: cleanRemoteNotesのDELETEにローカルstatement_timeoutを適用#17306pooza wants to merge 503 commits intomisskey-dev:developfrom
pooza wants to merge 503 commits intomisskey-dev:developfrom
Conversation
サーバーとの接続が切断されたとき「何もしない」
fix: AP受信時、tag配列にのみ存在するハッシュタグをテキストに補完
fix: スパムブロック時の例外をIdentifiableErrorに変更
Mastodon 4.2+のフッタータグ判定との互換性を確保。 <br />フラット構造を<p>タグ構造に変換することで、 lastChildが最後の<p>全体を取得し、末尾ハッシュタグ群が すべてフッタータグとして認識されるようにする。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
番組選択時にdecoration: {minutes: N}をコマンドノートに含め、
モロヘイヤ側のデコレーション自動適用・時限復元を発火させる。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Release/2026.3.0
MkSuspenseがフラグメントコンポーネント(v-if/v-else-if/v-else)のため、 RouterViewからのattribute fallthrough(.contentクラス)が適用されず、 スクロール領域が固定高さを持たなかった。 PageWithHeaderをedit.vueのルート要素に移動し、MkSuspenseをその内部に 配置することで修正。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix: ギャラリー編集画面のモバイルスクロール不具合を修正
リモートノート自動削除を有効化するにあたり、デフォルトハッシュタグ (config.defaultTag.tag)付きのノートはローカルコンテンツと同等に 扱い、削除対象から除外する。タグ名はハードコードせず設定から取得する。 Closes #408 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
minIdクエリがtry/catchで囲まれておらず、statement_timeoutで ジョブ全体がcrashしていた。バッチクエリには自動縮小の仕組みが あるが、minIdのcrashにより到達できなかった。 タイムアウト時はスキップして次回再試行する。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
minIdクエリと同様に、バッチサイズ最小時のスキップ処理(idWindow)も try/catchで囲まれておらず、タイムアウトでジョブ全体がcrashしていた。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DELETE クエリのcatchがclass 23(integrity violation)専用だったため、 statement_timeoutでジョブ全体がcrashしていた。タイムアウト時は このrunを終了し、次回実行で再試行する。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DELETE タイムアウト時に break するだけだったのを、candidateNotesQuery と同じパターンに変更。currentLimit を 1/4 に縮小して continue し、 cursorLeft を進めずに小さいバッチで再試行する。 最小値まで下げても失敗する場合のみ break する。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
グローバルstatement_timeout=10sはAPIクエリ保護のために必要だが、 数百万件規模のリモートノートツリーを削除するには短すぎる。 DELETEクエリをトランザクションで包み SET LOCAL statement_timeout='300s' を実行することで、対話クエリの保護を維持したまま削除バッチを通す。 ダイスキー本番ではこの制約によりcurrentLimitが最小値まで縮小しても DELETEがタイムアウトし早期break、1日の実削除が数十件に留まっていた。
Author
|
Wrong fork target — recreating on pooza/misskey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
ダイスキー本番(~980万行のnoteテーブル)で
cleanRemoteNotesを有効化した後、#411〜#414 の一連の修正を経て 2026-04-13 にようやく crash せず完走するようになった。しかし実際の削除件数は 35件/日 と極めて少なく、ジョブログには以下のパターンが残っていた:currentLimitを minimumLimit (10) まで縮小しても DELETE が statement_timeout (10s) に間に合わず、#414 の縮小リトライ後にbreakで終了していた。グローバルstatement_timeout = 10sは対話API保護のため必要だが、巨大なリモートノートツリーの DELETE には事実上通らない。削除が必要ないサーバーでは動くが、本当に必要な規模のサーバーでは削除が進まないという逆説的な状態。変更
DELETE クエリをトランザクションで包み、
SET LOCAL statement_timeout = '300s'で削除パスだけタイムアウトを緩和する。SET LOCALはトランザクション終了時に自動復帰するため、他のクエリパスには影響しない。効果(期待値)
リスク