mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
VAULT-25456 CE side of changes for snapshot restore namespace cache bug (#27474)
* VAULT-25456 CE side of changes for snapshot restore namespace cache bug * Changelog * Unexport function
This commit is contained in:
3
changelog/27474.txt
Normal file
3
changelog/27474.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:bug
|
||||||
|
storage/raft (enterprise): Fix issue with namespace cache not getting cleared on snapshot restore, resulting in namespaces not found in the snapshot being inaccurately represented by API responses.
|
||||||
|
```
|
||||||
@@ -18,3 +18,5 @@ func (c *Core) NamespaceByID(ctx context.Context, nsID string) (*namespace.Names
|
|||||||
func (c *Core) ListNamespaces(includePath bool) []*namespace.Namespace {
|
func (c *Core) ListNamespaces(includePath bool) []*namespace.Namespace {
|
||||||
return []*namespace.Namespace{namespace.RootNamespace}
|
return []*namespace.Namespace{namespace.RootNamespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Core) resetNamespaceCache() {}
|
||||||
|
|||||||
@@ -850,6 +850,10 @@ func (c *Core) raftSnapshotRestoreCallback(grabLock bool, sealNode bool) func(co
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the namespace cache so that any namespaces cached
|
||||||
|
// before the snapshot restore will no longer be present.
|
||||||
|
c.resetNamespaceCache()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user