divviup / divviup/janus

Add a `UNIQUE(task_id, aggregate_share_id)` constraint to the `aggregate_share_jobs` table.

Open Beginner friendly
#4,768 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
70
Forks
16
Avg merge
4h 36m
Merged PRs (30d)
30

Description

Perhaps a real fix would be to add a UNIQUE(task_id, aggregate_share_id) constraint to the aggregate_share_jobs table.

Originally posted by @jcjones in https://github.com/divviup/janus/pull/4766#discussion_r3723090610

DAP-19 (4.6.4. Obtaining Aggregate Shares) says:

A Helper aggregate share is identified by a server-selected
identifier, unique within the scope of the task, assigned during
resource creation (Section 3.2).

So we should enforce that.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the schema or migration that defines the aggregate_share_jobs table and inspect existing database constraint tests. Add coverage showing that duplicate task_id and aggregate_share_id pairs are rejected, then run the relevant database test suite to verify the constraint and migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.