Fix race in local node creation
It was possible for the metastore Open call to return before it actually created it's local node.pull/4019/head
parent
b8da247b08
commit
380d82b078
|
@ -256,6 +256,7 @@ func (s *Store) Open() error {
|
||||||
|
|
||||||
// Wait for a leader to be elected so we know the raft log is loaded
|
// Wait for a leader to be elected so we know the raft log is loaded
|
||||||
// and up to date
|
// and up to date
|
||||||
|
<-s.ready
|
||||||
return s.WaitForLeader(0)
|
return s.WaitForLeader(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue