Skip to content

Support caller-defined namespaces in merkledb#3747

Merged
joshua-kim merged 8 commits intomasterfrom
merkle-db-namespaces
Mar 5, 2025
Merged

Support caller-defined namespaces in merkledb#3747
joshua-kim merged 8 commits intomasterfrom
merkle-db-namespaces

Conversation

@joshua-kim
Copy link
Copy Markdown
Contributor

@joshua-kim joshua-kim commented Feb 26, 2025

Why this should be merged

Currently you're not able to create more than one merkledb instance, because we use a hard-coded metrics namespace into the provided metrics registerer. If a caller wants multiple db instances, it must create a separate metrics registry for each db instance.

We will need to have multiple merkledbs when we merkle-ize X/P-Chain State, so that we can support sub-trees

How this works

Adds a parameter to specify the metrics namespace

How this was tested

CI

Need to be documented in RELEASES.md?

No

@joshua-kim joshua-kim self-assigned this Feb 26, 2025
@joshua-kim joshua-kim requested a review from rrazvan1 February 26, 2025 22:52
@github-project-automation github-project-automation bot moved this to Backlog 🗄️ in avalanchego Feb 26, 2025
@joshua-kim joshua-kim moved this from Backlog 🗄️ to In Progress 🏗 in avalanchego Feb 26, 2025
@joshua-kim joshua-kim moved this from In Progress 🏗 to In Review 👀 in avalanchego Feb 26, 2025
@joshua-kim joshua-kim moved this from In Review 👀 to In Progress 🏗 in avalanchego Feb 26, 2025
@joshua-kim joshua-kim marked this pull request as ready for review February 26, 2025 22:55
Copy link
Copy Markdown
Contributor

@rrazvan1 rrazvan1 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshua-kim joshua-kim enabled auto-merge March 4, 2025 15:11
Comment thread x/merkledb/db.go Outdated
Comment thread x/merkledb/db.go Outdated
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Comment thread x/merkledb/metrics.go Outdated
joshua-kim and others added 2 commits March 5, 2025 17:18
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress 🏗 to In Review 👀 in avalanchego Mar 5, 2025
@joshua-kim joshua-kim added this pull request to the merge queue Mar 5, 2025
Merged via the queue into master with commit 7e56747 Mar 5, 2025
22 checks passed
@joshua-kim joshua-kim deleted the merkle-db-namespaces branch March 5, 2025 22:50
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in avalanchego Mar 5, 2025
cam-schultz pushed a commit that referenced this pull request Mar 24, 2025
Signed-off-by: Joshua Kim <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants