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

chore(rocksdb): getter for inner database handle #2532

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Jan 6, 2025

Linked Issues/PRs

  • none

Description

Should allow consumers of the library to get the inner db handle if they wanted to create a backup etc.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@rymnc rymnc requested a review from a team January 6, 2025 10:46
@rymnc rymnc self-assigned this Jan 6, 2025
@rymnc rymnc requested a review from AurelienFT January 6, 2025 15:45
Copy link
Member

@MitchTurner MitchTurner left a comment

Choose a reason for hiding this comment

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

LGTM

@rymnc rymnc enabled auto-merge (squash) January 6, 2025 16:07
@rymnc rymnc merged commit a25ec26 into master Jan 6, 2025
30 checks passed
@rymnc rymnc deleted the qol/get-inner-db-handle branch January 6, 2025 16:31
@@ -106,6 +106,10 @@ where
})
}

pub fn inner(&self) -> &RocksDb<Historical<Description>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The problem with exposing it is that anyone can commit to the internal database bypassing the historical functionality. Maybe it is possible to just add backup functionality directly?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe we can put it under the "test-helpers" feature flag?

Copy link
Member

@MitchTurner MitchTurner Jan 6, 2025

Choose a reason for hiding this comment

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

Maybe we can add a read-only wrapper for this somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

draft pr: #2535

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

Successfully merging this pull request may close these issues.

4 participants