Conversation
同時参加時の競合状態を検証するためのテストを追加。 現状では競合状態により一部の参加者が失われることを確認。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 3つに分離していたatomic操作を単一のatomic操作に統合 - versionstampチェックによる楽観的ロックを実装 - 競合発生時は最大3回までリトライ - 複数インスタンス環境での同時参加時に参加者が失われる問題を修正 Fixes #32 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sendCurrentRoomState関数のテストを追加: - Room情報を正しく送信することを確認 - userTokenがnullの場合は送信しないことを確認 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- sendCurrentRoomState関数を追加 - auth完了時に即座にKVから最新Room情報を取得して送信 - REST APIレスポンスとKV更新のタイミングの差異を解消 Fixes #32 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- MAX_RETRIESをJOIN_ROOM_MAX_RETRIESとしてファイル先頭に定数化 - userToken初期化をnull合体演算子で簡潔化 - userTokenInfo生成ロジックを単一のオブジェクト生成に統合 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- リトライ回数を3→5に増加 - 指数バックオフ: 10ms, 20ms, 40ms, 80ms, 160ms - ジッター: ランダムな揺らぎで同時リトライを回避 - 高負荷時の連続競合を軽減 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- fetchWithRetry: 503エラー時に指数バックオフでリトライ(最大2回) - joinRoomApiでリトライ機能を使用 - エラーメッセージを改善(再読み込みを促す) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
Test plan
deno test backend/- 59テストすべてパスFixes #32
🤖 Generated with Claude Code