Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[db] Move towards sync deletion (away from PeriodicDeleter) - step I/II #18825

Closed
wants to merge 8 commits into from

Conversation

geropl
Copy link
Member

@geropl geropl commented Sep 27, 2023

Description

PeriodicDeleter is a leftover of the time we had multiple databases + db-sync, which forced us to have an async deletion mechanism. Since this is no longer true, we should move away from this pattern as it started to rot really badly.

It's step I/II, and defensively only switches to sync deletion for the entities that don't do that already. Column deletion is done in a 2nd step (#18826).

For details see the commits overview.

Summary generated by Copilot

🤖 Generated by Copilot at c7d19e6

This pull request refactors the database layer of the gitpod-io/gitpod repository to use hard deletion instead of soft deletion for several tables and entities. This simplifies the code, improves performance and maintainability, and avoids unnecessary data retention. It also removes the unused deleted columns and properties from the d_b_team, d_b_project, Project, and Organization tables and interfaces. It includes the corresponding migration files to apply the schema changes to the existing database.

Related Issue(s)

Fixes EXP-718

How to test

  • check server logs, and verify that there are no errors (from garbage collectors or PeriodicDeleter)

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@geropl geropl changed the title [WIP] Move towards sync deletion (away from PeriodicDeleter) [WIP] Move towards sync deletion (away from PeriodicDeleter) - step I/II Sep 27, 2023
@geropl geropl marked this pull request as ready for review September 27, 2023 14:59
@geropl geropl requested a review from a team as a code owner September 27, 2023 14:59
@geropl geropl changed the title [WIP] Move towards sync deletion (away from PeriodicDeleter) - step I/II [db] Move towards sync deletion (away from PeriodicDeleter) - step I/II Sep 27, 2023
@geropl
Copy link
Member Author

geropl commented Sep 28, 2023

Superseded by #18833

@geropl geropl closed this Sep 28, 2023
@geropl geropl deleted the gpl/716-deleted branch December 20, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants