Skip to content

[server/db] resume periodic deleter on quorum re-election #17092

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

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

AlexTugarev
Copy link
Member

Quorum leader is re-elected whenever the leader got unresponsive, but the periodic deleter is only considering this once on server init. This can lead to a state where no deleter is active.

How to test

Release Notes

NONE

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /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

@AlexTugarev AlexTugarev requested a review from a team March 30, 2023 11:29
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 30, 2023
} else {
log.info("[PeriodicDbDeleter] Current instance is not the leader, periodic deleter will not run.");
}
this.periodicDbDeleter.start(async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

periodic deleter lives in gitpod-db, therefore I opted for the callback as signal of enablement.

Copy link
Member

Choose a reason for hiding this comment

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

Nice, the main difference is we always start, but then do not run if we're not the leader.

@roboquat roboquat merged commit 94340c7 into main Mar 30, 2023
@roboquat roboquat deleted the at/resume-deleter branch March 30, 2023 11:40
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Mar 30, 2023
@AlexTugarev AlexTugarev mentioned this pull request Mar 30, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

3 participants