Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

ABR15: "clear locks task" wiring #5892

Merged
merged 18 commits into from
Feb 8, 2022
Merged

ABR15: "clear locks task" wiring #5892

merged 18 commits into from
Feb 8, 2022

Conversation

gsheasby
Copy link
Contributor

@gsheasby gsheasby commented Feb 7, 2022

Goals (and why):
Final part of the production code for Atlas Backup/Restore work stream.
Wires up the AllNodesDisabledNamespacesUpdater, added in #5876, to the TimeLockManagementResource, and adds new public methods in AtlasRestoreService.

==COMMIT_MSG==
Added AtlasRestoreService methods prepareRestore and completeRestore, which will respectively disable and re-enable TimeLock, and should be called during the restore process.
==COMMIT_MSG==

Implementation Description (bullets):

  • Wired up new endpoints
  • Pulled out a small AuthHeaderValidator class for reuse of auth validation logic added in ABR13: Validate auth headers #5890.
  • Added javadoc for new methods

Testing (What was existing testing like? What have you done to improve it?):

  • Moved some validation tests to AuthHeaderValidatorTest

Concerns (what feedback would you like?):
Do we want to take the time to add retry logic now? These methods should now work end-to-end, although flakes may require manual action.

Where should we start reviewing?: AtlasRestoreService

Priority (whenever / two weeks / yesterday): ASAP, the next parts are blocked on this piece.

@gsheasby gsheasby requested a review from gmaretic February 7, 2022 14:53
@changelog-app
Copy link

changelog-app bot commented Feb 7, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Added AtlasRestoreService methods prepareRestore and completeRestore, which will respectively disable and re-enable TimeLock, and should be called during the restore process.

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link
Contributor

@gmaretic gmaretic left a comment

Choose a reason for hiding this comment

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

A few nits, but overall looks good!


/**
* Disables TimeLock on all nodes for the given namespaces.
* Should be called exactly once prior to a restore operation. Calling this on multiple nodes will cause conflicts.
Copy link
Contributor

Choose a reason for hiding this comment

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

funny fact: we have a NonIdempotent annotation. Check its javadoc...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🌶️

@@ -98,16 +151,65 @@ public static AtlasRestoreService create(
Set<Namespace> namespaces, BiConsumer<String, RangesForRepair> repairTable) {
Map<Namespace, CompletedBackup> completedBackups = getCompletedBackups(namespaces);
Set<Namespace> namespacesToRepair = completedBackups.keySet();
restoreTables(repairTable, completedBackups, namespacesToRepair);
Copy link
Contributor

Choose a reason for hiding this comment

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

restore -> repair

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done (also renamed the restoreTransactionsTables method below to repairTransactionsTables)

@bulldozer-bot bulldozer-bot bot merged commit 0a74101 into develop Feb 8, 2022
@bulldozer-bot bulldozer-bot bot deleted the gs/wire-andnu branch February 8, 2022 16:12
@svc-autorelease
Copy link
Collaborator

Released 0.538.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants