mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
check for bad etcd entry
This commit is contained in:
parent
819b9ef655
commit
98bb92ecf4
1 changed files with 13 additions and 4 deletions
17
core/etcd.go
17
core/etcd.go
|
|
@ -176,10 +176,19 @@ func (self *TopologyMapper) handlenode(node *etcd.Node) error {
|
|||
var process_uuid util.GUID
|
||||
var process *db.Process
|
||||
var err error
|
||||
process_uuid, err = util.ParseGUID(node.Value)
|
||||
if err != nil {
|
||||
log.Println("Bad Process Guid", key)
|
||||
return errors.New("No Process Id")
|
||||
|
||||
if len(bits) > 8 {
|
||||
if bits[8] != "process" {
|
||||
return errors.New("no process")
|
||||
}
|
||||
|
||||
process_uuid, err = util.ParseGUID(node.Value)
|
||||
if err != nil {
|
||||
log.Println("Bad Process Guid", key)
|
||||
return errors.New("No Process Id")
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(bits) <= 1 || bits[0] != "db" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue