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

fix: ClearChecksums should not throw Exception in empty databases #5665

Merged
merged 1 commit into from Mar 11, 2024

Conversation

filipelautert
Copy link
Collaborator

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

After #4628 clearChecksums started to raise exceptions in empty databases. This PR fixes this behavior.

Fixes #5319

@@ -31,9 +34,10 @@ public void run(CommandResultsBuilder resultsBuilder) throws Exception {
CommandScope commandScope = resultsBuilder.getCommandScope();
final Database database = (Database) commandScope.getDependency(Database.class);

ChangeLogHistoryService changeLogService = ChangeLogHistoryServiceFactory.getInstance().getChangeLogService(database);
ChangeLogHistoryService changeLogHistoryService = Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).getChangeLogService(database);
changeLogHistoryService.init();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Init was missing.

@filipelautert filipelautert merged commit 2149ec9 into master Mar 11, 2024
62 of 66 checks passed
@filipelautert filipelautert deleted the 5319-fix-clear-checksums branch March 11, 2024 20:40
@filipelautert filipelautert added this to the 1NEXT milestone Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
2 participants