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

node: remove namespace manager Ready() panic #1293

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/node/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func buildServer(ctx context.Context, d *coreDependencies) *server {
es, vs := buildVoteStore(ctx, d, closers) // ev, vs

// engine

e := buildEngine(d, db, accounts, vs, d.namespaceManager)
d.namespaceManager.Ready()

Expand Down
6 changes: 2 additions & 4 deletions app/node/namespace_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ func (n *namespaceManager) Filter(ns string) bool {
defer n.mu.RUnlock()

if !n.ready {
// this would indicate a bug in our startup process
panic("namespace manager not ready")
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this ready field or Ready() method anymore right?

Copy link
Collaborator Author

@brennanjl brennanjl Jan 24, 2025

Choose a reason for hiding this comment

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

Yeah we should keep them, because we do not want to return info or kwild_engine as snapshottable schemas if they do not exist

}
_, ok := n.namespaces[ns]
return ok
Expand All @@ -76,8 +75,7 @@ func (n *namespaceManager) ListPostgresSchemasToDump() []string {
defer n.mu.RUnlock()

if !n.ready {
// this would indicate a bug in our startup process
panic("namespace manager not ready")
return nil
}

res := make([]string, len(n.namespaces)+2)
Expand Down
Loading