Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add optimistic concurrency (RowVersion) to user-editable entities

オープン
#52 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
backend, databases

調査の方向性

LearnStack.Core/Data/Models/LearningResource.cs と LearnStack.Core/Services/LearningResourceService.cs:105-130 から始め、続いて 157-176 行にあるサービスの一括並べ替えの処理経路を追跡します。対応する ContentIdea モデルとサービスを特定し、DbUpdateConcurrencyException がユーザー向けのフローに到達する仕組みを確認します。同時編集時に競合メッセージが表示され、古いクライアント側の並べ替えによって変更が暗黙的に失われなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Tier 2 — correctness

Problem

No entity carries a concurrency token, and the update services copy every field from the incoming object onto the tracked entity. Two browser tabs — very common in a Blazor Server app, and the resource list is also edited from dialogs — silently overwrite each other, last write wins. Drag-and-drop reordering makes this worse because it rewrites CustomOrder across many rows at once.

Evidence
  • LearnStack.Core/Data/Models/LearningResource.cs — no RowVersion
  • LearnStack.Core/Services/LearningResourceService.cs:105-130 — wholesale field copy
  • LearnStack.Core/Services/LearningResourceService.cs:157-176 — bulk CustomOrder rewrite
Proposed fix
  1. Add [Timestamp] public byte[]? RowVersion { get; set; } to LearningResource and ContentIdea.
  2. Handle DbUpdateConcurrencyException in the services and surface a "this item changed elsewhere" message instead of silently overwriting.
Acceptance criteria
  • Concurrent edits produce a conflict message rather than silent data loss
  • Reordering is resilient to a stale client-side list
主要言語
HTML
スター
10
フォーク
0
平均マージ
2時間 35分
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kasuken/LearnStack のほかの issue

kasuken/LearnStack の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。