Merge commit '52c4d1f' into feat/remote-node
# Conflicts: # internal/db/db.go
This commit is contained in:
@@ -242,6 +242,9 @@ func (c *Client) Push(kdb *db.KnoxDB, peerVector map[string]int64) (int, error)
|
||||
return 0, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode/100 != 2 {
|
||||
return 0, fmt.Errorf("push to %s: %s", c.Addr, resp.Status)
|
||||
}
|
||||
var out struct {
|
||||
Accepted int `json:"accepted"`
|
||||
}
|
||||
@@ -354,7 +357,13 @@ func Run(kdb *db.KnoxDB, m *metrics.Metrics, static []string) int {
|
||||
m.IncrementPull(pulled)
|
||||
}
|
||||
|
||||
pushed, _ := c.Push(kdb, p.Vector)
|
||||
pushed, err := c.Push(kdb, p.Vector)
|
||||
if err != nil {
|
||||
log.Printf("[gossip] push %s: %v", addr, err)
|
||||
if m != nil {
|
||||
m.IncrementErrors()
|
||||
}
|
||||
}
|
||||
if m != nil {
|
||||
m.IncrementPush(pushed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user