etcdserver: Implement running defrag if freeable space will exceed privided threshold

This commit is contained in:
Marek Siarkowicz
2021-05-10 13:50:09 +02:00
parent 5bad818c70
commit efc8505739
7 changed files with 52 additions and 0 deletions

View File

@@ -188,6 +188,10 @@ type ServerConfig struct {
// ExperimentalTxnModeWriteWithSharedBuffer enable write transaction to use
// a shared buffer in its readonly check operations.
ExperimentalTxnModeWriteWithSharedBuffer bool `json:"experimental-txn-mode-write-with-shared-buffer"`
// ExperimentalBootstrapDefragThresholdMegabytes is the minimum number of megabytes needed to be freed for etcd server to
// consider running defrag during bootstrap. Needs to be set to non-zero value to take effect.
ExperimentalBootstrapDefragThresholdMegabytes uint `json:"experimental-bootstrap-defrag-threshold-megabytes"`
}
// VerifyBootstrap sanity-checks the initial config for bootstrap case