exercism / exercism/website

ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '6742bda8db58429db0b6de61f8338608' for key 'submission_test_runs.index_submission_test_runs_on_tooling_job_id' (ActiveRecord::RecordNotUnique)

Open
#9,486 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
548
Forks
168
Avg merge
1d 3h
Merged PRs (30d)
28

Description

## Error

```
Duplicate entry '6742bda8db58429db0b6de61f8338608' for key 'submission_test_runs.index_submission_test_runs_on_tooling_job_id' (Mysql2::Error)
```

## Stack trace

```
mysql2/client.rb:151 in _query
mysql2/client.rb:151 in block in Mysql2::Client#query
mysql2/client.rb:150 in Thread.handle_interrupt
mysql2/client.rb:150 in query
active_record/connection_adapters/mysql2/database_statements.rb:100 in block (2 levels) in ActiveRecord::ConnectionAdapters::Mysql2::DatabaseStatements#raw_execute
active_record/connection_adapters/abstract_adapter.rb:1027 in block in ActiveRecord::ConnectionAdapters::AbstractAdapter#with_raw_connection
active_support/concurrency/null_lock.rb:9 in synchronize
active_record/connection_adapters/abstract_adapter.rb:999 in with_raw_connection
active_record/connection_adapters/mysql2/database_statements.rb:98 in block in ActiveRecord::ConnectionAdapters::Mysql2::DatabaseStatements#raw_execute
active_support/notifications/instrumenter.rb:58 in instrument
```

## Tracking Details
- **Project**: exercism-rails
- **Sentry**: [ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '6742bda8db58429db0b6de61f8338608' for key 'submission_test_runs.index_submission_test_runs_on_tooling_job_id' (ActiveRecord::RecordNotUnique)](https://thalamus-ai.sentry.io/issues/146301748/)
- **Culprit**: SPI::ToolingJobsController#update
- **First seen:** Sep 10, 2026

Contributor guide

Open the contributing guide

Research direction

Start at SPI::ToolingJobsController#update and trace the submission_test_runs.index_submission_test_runs_on_tooling_job_id failure through the MySQL and ActiveRecord stack frames shown. No test is named in the issue; done means identifying the duplicate-creation path and verifying a fix against the reported Sentry failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, rails, ruby
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.