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

Bug fix 3.11/hotbackup restore analyzers #20940

Merged
merged 6 commits into from
May 16, 2024

Conversation

mchacki
Copy link
Member

@mchacki mchacki commented May 15, 2024

Scope & Purpose

This PR fixes a bug which happens on Hotbackup restore, that only shows up on clusters that started with 3.6 or older. And was upgraded ever since. If such a deployment goes to 3.11.8, and wants to restore a backup this will fail.

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0: (Please link PR)
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

@mchacki mchacki added the 1 Bug label May 15, 2024
@mchacki mchacki self-assigned this May 15, 2024
@mchacki mchacki requested a review from a team as a code owner May 15, 2024 13:37
@cla-bot cla-bot bot added the cla-signed label May 15, 2024
@jsteemann jsteemann added this to the 3.11 milestone May 15, 2024
// Now create the regression. In version 3.6 the entry /arango/Plan/Analyzers did not exist.


assertTrue(readAgencyValueAt("Plan/Analyzers") !== undefined, "We should have analyzers in plan by default.");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: instead of assertTrue(x !== undefined) we could use assertNotUndefined(x), which is more legible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah nice, did not know this existed!

Copy link
Contributor

@jsteemann jsteemann left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +6963 to +6965
return {TRI_ERROR_HOT_BACKUP_INTERNAL,
"Failed to restore agency plan from Hotbackup. Please contact "
"ArangoDB support immediately."};
Copy link
Member

Choose a reason for hiding this comment

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

Should this be an ADB_PROD_ASSERT?

@KVS85 KVS85 merged commit 8c0dcba into 3.11 May 16, 2024
2 checks passed
@KVS85 KVS85 deleted the bug-fix-3.11/hotbackup-restore-analyzers branch May 16, 2024 08:51
mchacki added a commit that referenced this pull request May 21, 2024
* Applied fix to set empty objects instead of none for Plan entries that do not exist in HB. Properly react to agency response, if the input is of illegal format.

* Actually report an error if replanning of the AgencyPlan fails

* Added a failure point for test.

* Added hotbackup regression tests

* Applied clang-format

---------

Co-authored-by: Vadim Kondratev <vadim@arangodb.com>
@mchacki mchacki mentioned this pull request May 21, 2024
19 tasks
CryptoNinjaGeek pushed a commit that referenced this pull request May 23, 2024
* Bug fix 3.11/hotbackup restore analyzers (#20940)

* Applied fix to set empty objects instead of none for Plan entries that do not exist in HB. Properly react to agency response, if the input is of illegal format.

* Actually report an error if replanning of the AgencyPlan fails

* Added a failure point for test.

* Added hotbackup regression tests

* Applied clang-format

---------

Co-authored-by: Vadim Kondratev <vadim@arangodb.com>

* Bug fix 3.11/hotbackup community test (#20947)

* Replaced asserts on undefined with convenience method:

* Fixed a race condtion after Hotbackup Restore, and after adding a DBServer, the List of Databases could be empty.

* Added CHANGELOG entry

---------

Co-authored-by: Vadim Kondratev <vadim@arangodb.com>

* Added lost code from cherry-pick

---------

Co-authored-by: Vadim Kondratev <vadim@arangodb.com>
Co-authored-by: jsteemann <jsteemann@users.noreply.github.com>
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.

None yet

4 participants