MM-8607: Add ability to turn off non-critical services when under load; cluster support (#13267)

* MM-8607: Add cluster support for server busy status

MM-8607: Busy.Cluster should be non-exported

MM-8607: rename logging field seconds -> expires_sec

MM-8607: each node clears its own busy flag

MM-8607: ensure unit tests are not sensitive to test machine speed

* MM-8607: chg comment to force CI rebuild
Этот коммит содержится в:
Doug Lauder
2019-12-03 12:56:40 -05:00
коммит произвёл Jesús Espino
родитель 4ebc71ed38
Коммит 420c411595
8 изменённых файлов: 173 добавлений и 30 удалений

Просмотреть файл

@@ -36,6 +36,7 @@ const (
CLUSTER_EVENT_CLEAR_SESSION_CACHE_FOR_ALL_USERS = "inv_all_user_sessions"
CLUSTER_EVENT_INSTALL_PLUGIN = "install_plugin"
CLUSTER_EVENT_REMOVE_PLUGIN = "remove_plugin"
CLUSTER_EVENT_BUSY_STATE_CHANGED = "busy_state_change"
// SendTypes for ClusterMessage.
CLUSTER_SEND_BEST_EFFORT = "best_effort"

Просмотреть файл

@@ -51,6 +51,7 @@ type SystemECDSAKey struct {
D *big.Int `json:"d,omitempty"`
}
// ServerBusyState provides serialization for app.Busy.
type ServerBusyState struct {
Busy bool `json:"busy"`
Expires int64 `json:"expires"`