Sycnrhonized operations that change the value of the cluster wide cap. Added cleverRecap(...) that determines the recap value of the cluster at a much finer level, taking into account the average load on each node in the cluster. Bug fix in cap.go -- closed the session once capping had been done. This prevented from running out of file descriptors.
This commit is contained in:
parent
cd644bbf69
commit
c1eaa453a2
4 changed files with 194 additions and 68 deletions
|
@ -26,6 +26,7 @@ func Cap(host, username string, percentage int) error {
|
|||
}
|
||||
|
||||
session, err := connection.NewSession()
|
||||
defer session.Close()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed to create session")
|
||||
}
|
||||
|
|
Reference in a new issue