Race Condition in Access Code Generation for Quiz
维护者通常 1 天内回复
@chetna123-ch 已经在做这个了。
开始于 2026年10月19日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- express, postgresql, typescript
调研方向
Start at the endpoint named in the issue, /apps/http-server/routes/api/v1/quizzes/:quizId/generate-access-code, and trace how it generates and stores access codes. Check the database schema and existing tests for uniqueness constraints or collision handling. Done means concurrent requests cannot assign duplicate codes and collisions are handled safely; the payload does not name a test file.
由索引模型根据 Issue 内容生成。
描述
📍 Location
/apps/http-server/routes/api/v1/quizzes/:quizId/generate-access-code
Problem Description
The current implementation of the access code generation endpoint is vulnerable to a race condition when multiple users request a code simultaneously.
Scenario:
User A and User B send a request at the same time
Both requests execute generateCode()
Both receive the same generated code (e.g., AC123A)
The system assigns duplicate access codes
This leads to non-unique access codes, which breaks the assumption that each quiz session should have a unique join code.
Expected Behavior
- Each generated access code must be globally unique
- Concurrent requests should never result in duplicate codes
- The system should handle collisions gracefully (e.g., retry mechanism)
- 主要语言
- TypeScript
- 星标
- 21
- 派生
- 7
- 平均合并
- 3 小时 39 分钟
- 30 天内合并 PR
- 16
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TheCodeHeist-Coder/Rexial 的其他 Issue
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
TheCodeHeist-Coder/Rexial#195 ·
维护者通常 1 天内回复
-
Backend first issue bug help wanted
难度 2/5 1-3 小时 新手友好度 84/100
TheCodeHeist-Coder/Rexial#193 ·
维护者通常 1 天内回复
-
Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 86/100
TheCodeHeist-Coder/Rexial#192 ·
维护者通常 1 天内回复
-
Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
TheCodeHeist-Coder/Rexial#191 ·
维护者通常 1 天内回复
-
good first issue help wanted UI & UX
难度 2/5 1-3 小时 新手友好度 90/100
TheCodeHeist-Coder/Rexial#190 ·
维护者通常 1 天内回复
查看 TheCodeHeist-Coder/Rexial 的全部 Issue
相似的 Issue
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Status: Triage
难度 2/5 1-3 小时 新手友好度 76/100
mermaid-js/mermaid#8546 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
维护者通常 1 天内回复