Cleanup DB state after #7171
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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