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

Move towards sync deletion (away from PeriodicDeleter) - step II/II #18866

Merged
merged 11 commits into from
Oct 6, 2023

Conversation

geropl
Copy link
Member

@geropl geropl commented Oct 4, 2023

Description

Depends on - and follow-up to: #18833

Deletes all the columns that we are not using anymore.

Summary generated by Copilot

🤖 Generated by Copilot at 66cbbe5

This pull request removes the deleted column from various tables and entities in the components/gitpod-db module and replaces it with the markedDeleted column where applicable. It also drops some unused tables from the database schema. It adds migration scripts to apply these changes to the database. The purpose of this pull request is to simplify and update the database schema and the code that interacts with it.

Related Issue(s)

Fixes EXP-719

How to test

  • check server logs, and verify that database-gc does execute without errors
  • create an org, and successfully delete it right after

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 force-pushed the gpl/719-deleted-2 branch from ea39188 to e846327 Compare October 4, 2023 12:27
@geropl geropl changed the title [WIP] Move towards sync deletion (away from PeriodicDeleter) - step II/II Move towards sync deletion (away from PeriodicDeleter) - step II/II Oct 4, 2023
@geropl geropl marked this pull request as ready for review October 4, 2023 12:59
@geropl geropl requested a review from a team as a code owner October 4, 2023 12:59
Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we deploy, there might be a few entries in the DB that are marked but not deleted. We would need to make sure the periodic deleter runs once more before removing the logic around the deletionColumn

@geropl
Copy link
Member Author

geropl commented Oct 4, 2023

When we deploy, there might be a few entries in the DB that are marked but not deleted. We would need to make sure the periodic deleter runs once more before removing the logic around the deletionColumn

That's why I deployed the first part of this PR, which changed how we delete stuff (the writes), on Friday.

By now Cloud + all Dedicated instances received that version (commits), and should also executed the deleter often enough to cleanup the old stuff. This PR only deletes columns/tables we are not using anymore (except the Go changes which an oversight, but they are not used anywhere except tests...), and adjusts the reads/selects.

@geropl
Copy link
Member Author

geropl commented Oct 4, 2023

Just found an oversight, though: ALORIGTHM=INSTANT creeped back in 🙈 Will remove those.

@geropl
Copy link
Member Author

geropl commented Oct 4, 2023

Just found an oversight, though: ALORIGTHM=INSTANT creeped back in 🙈 Will remove those.

Done.

@geropl
Copy link
Member Author

geropl commented Oct 5, 2023

Thanks for the ✔️ !

I will hold this until tomorrow, so I can attend the rollout. 👍

@geropl
Copy link
Member Author

geropl commented Oct 6, 2023

/unhold

@roboquat roboquat merged commit 5bf82cd into main Oct 6, 2023
@roboquat roboquat deleted the gpl/719-deleted-2 branch October 6, 2023 06:59
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.

3 participants