mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 07:01:01 +00:00
Fix ApplySchema API
This commit is contained in:
parent
5d9fd0906c
commit
d827f63148
1 changed files with 3 additions and 1 deletions
4
api.go
4
api.go
|
|
@ -1022,10 +1022,12 @@ func (api *API) ApplySchema(ctx context.Context, s *Schema, remote bool) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !remote {
|
||||
nodes := api.cluster.Nodes()
|
||||
for i, node := range nodes {
|
||||
if node.ID == api.Node().ID {
|
||||
continue
|
||||
}
|
||||
err := api.server.defaultClient.PostSchema(ctx, &node.URI, s, true)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "forwarding post schema to node %d of %d", i+1, len(nodes))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue