Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Race Condition in Access Code Generation for Quiz

Open
#140 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@chetna123-ch is already working on this.

Since Oct 19, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
express, postgresql, typescript
Domain
backend, databases

Research direction

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.

Written by the indexing model from the issue text.

Description

Backend first issue good first issue help wanted

📍 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)
Dominant language
TypeScript
Stars
21
Forks
7
Avg merge
3h 39m
Merged PRs (30d)
16

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TheCodeHeist-Coder/Rexial

All issues in TheCodeHeist-Coder/Rexial

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.