gitpod-io / gitpod-io/gitpod

Cleanup DB state after #7171

Open
#10,002 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

aspect: performance aspect: tech-debt component: db meta: never-stale type: improvement
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Original issue: https://github.com/gitpod-io/gitpod/issues/7171

It seems we still have some users with a bad DB state. We should cleanup those duplicates.

Identify users by counting subscriptions per user, and display those with more than 10 should turn up the one in bad state.

select count(distinct userId) users
from (
     select
        userId,
        count(*) as subscriptions
     from src_db_prod.subscriptions
     group by 1
     having subscriptions >= 1000
         )

Contributor guide

Open the contributing guide

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

No repository files or tests are named. Start with original issue #7171 and the supplied src_db_prod.subscriptions query; clarify the conflicting thresholds, identify users with duplicate subscriptions, and determine what cleanup is required for the bad database state.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.