Merge pull request #11262 from WIZARD-CXY/updateflag
*: promote the boltdb-freelistType from experimental to officialrelease-3.5
commit
a65e4d3357
|
@ -89,6 +89,11 @@ To start etcd automatically using custom settings at startup in Linux, using a [
|
||||||
+ default: 0
|
+ default: 0
|
||||||
+ env variable: ETCD_BACKEND_BATCH_LIMIT
|
+ env variable: ETCD_BACKEND_BATCH_LIMIT
|
||||||
|
|
||||||
|
### --backend-bbolt-freelist-type
|
||||||
|
+ The freelist type that etcd backend(bboltdb) uses (array and map are supported types).
|
||||||
|
+ default: map
|
||||||
|
+ env variable: ETCD_BACKEND_BBOLT_FREELIST_TYPE
|
||||||
|
|
||||||
### --backend-batch-interval
|
### --backend-batch-interval
|
||||||
+ BackendBatchInterval is the maximum time before commit the backend transaction.
|
+ BackendBatchInterval is the maximum time before commit the backend transaction.
|
||||||
+ default: 0
|
+ default: 0
|
||||||
|
@ -436,11 +441,6 @@ Follow the instructions when using these flags.
|
||||||
|
|
||||||
## Experimental flags
|
## Experimental flags
|
||||||
|
|
||||||
### --experimental-backend-bbolt-freelist-type
|
|
||||||
+ The freelist type that etcd backend(bboltdb) uses (array and map are supported types).
|
|
||||||
+ default: array
|
|
||||||
+ env variable: ETCD_EXPERIMENTAL_BACKEND_BBOLT_FREELIST_TYPE
|
|
||||||
|
|
||||||
### --experimental-corrupt-check-time
|
### --experimental-corrupt-check-time
|
||||||
+ Duration of time between cluster corruption check passes
|
+ Duration of time between cluster corruption check passes
|
||||||
+ default: 0s
|
+ default: 0s
|
||||||
|
|
|
@ -77,7 +77,7 @@ const (
|
||||||
// More details are listed in ../Documentation/tuning.md#time-parameters.
|
// More details are listed in ../Documentation/tuning.md#time-parameters.
|
||||||
maxElectionMs = 50000
|
maxElectionMs = 50000
|
||||||
// backend freelist map type
|
// backend freelist map type
|
||||||
freelistMapType = "map"
|
freelistArrayType = "array"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -171,10 +171,12 @@ type Config struct {
|
||||||
// BackendBatchInterval is the maximum time before commit the backend transaction.
|
// BackendBatchInterval is the maximum time before commit the backend transaction.
|
||||||
BackendBatchInterval time.Duration `json:"backend-batch-interval"`
|
BackendBatchInterval time.Duration `json:"backend-batch-interval"`
|
||||||
// BackendBatchLimit is the maximum operations before commit the backend transaction.
|
// BackendBatchLimit is the maximum operations before commit the backend transaction.
|
||||||
BackendBatchLimit int `json:"backend-batch-limit"`
|
BackendBatchLimit int `json:"backend-batch-limit"`
|
||||||
QuotaBackendBytes int64 `json:"quota-backend-bytes"`
|
// BackendFreelistType specifies the type of freelist that boltdb backend uses (array and map are supported types).
|
||||||
MaxTxnOps uint `json:"max-txn-ops"`
|
BackendFreelistType string `json:"backend-bbolt-freelist-type"`
|
||||||
MaxRequestBytes uint `json:"max-request-bytes"`
|
QuotaBackendBytes int64 `json:"quota-backend-bytes"`
|
||||||
|
MaxTxnOps uint `json:"max-txn-ops"`
|
||||||
|
MaxRequestBytes uint `json:"max-request-bytes"`
|
||||||
|
|
||||||
LPUrls, LCUrls []url.URL
|
LPUrls, LCUrls []url.URL
|
||||||
APUrls, ACUrls []url.URL
|
APUrls, ACUrls []url.URL
|
||||||
|
@ -276,8 +278,6 @@ type Config struct {
|
||||||
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
|
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
|
||||||
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
|
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
|
||||||
ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"`
|
ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"`
|
||||||
// ExperimentalBackendFreelistType specifies the type of freelist that boltdb backend uses (array and map are supported types).
|
|
||||||
ExperimentalBackendFreelistType string `json:"experimental-backend-bbolt-freelist-type"`
|
|
||||||
// ExperimentalEnableLeaseCheckpoint enables primary lessor to persist lease remainingTTL to prevent indefinite auto-renewal of long lived leases.
|
// ExperimentalEnableLeaseCheckpoint enables primary lessor to persist lease remainingTTL to prevent indefinite auto-renewal of long lived leases.
|
||||||
ExperimentalEnableLeaseCheckpoint bool `json:"experimental-enable-lease-checkpoint"`
|
ExperimentalEnableLeaseCheckpoint bool `json:"experimental-enable-lease-checkpoint"`
|
||||||
ExperimentalCompactionBatchLimit int `json:"experimental-compaction-batch-limit"`
|
ExperimentalCompactionBatchLimit int `json:"experimental-compaction-batch-limit"`
|
||||||
|
@ -907,9 +907,9 @@ func (cfg *Config) getMetricsURLs() (ss []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseBackendFreelistType(freelistType string) bolt.FreelistType {
|
func parseBackendFreelistType(freelistType string) bolt.FreelistType {
|
||||||
if freelistType == freelistMapType {
|
if freelistType == freelistArrayType {
|
||||||
return bolt.FreelistMapType
|
return bolt.FreelistArrayType
|
||||||
}
|
}
|
||||||
|
|
||||||
return bolt.FreelistArrayType
|
return bolt.FreelistMapType
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
|
||||||
return e, err
|
return e, err
|
||||||
}
|
}
|
||||||
|
|
||||||
backendFreelistType := parseBackendFreelistType(cfg.ExperimentalBackendFreelistType)
|
backendFreelistType := parseBackendFreelistType(cfg.BackendFreelistType)
|
||||||
|
|
||||||
srvcfg := etcdserver.ServerConfig{
|
srvcfg := etcdserver.ServerConfig{
|
||||||
Name: cfg.Name,
|
Name: cfg.Name,
|
||||||
|
|
|
@ -155,6 +155,7 @@ func newConfig() *config {
|
||||||
fs.UintVar(&cfg.ec.ElectionMs, "election-timeout", cfg.ec.ElectionMs, "Time (in milliseconds) for an election to timeout.")
|
fs.UintVar(&cfg.ec.ElectionMs, "election-timeout", cfg.ec.ElectionMs, "Time (in milliseconds) for an election to timeout.")
|
||||||
fs.BoolVar(&cfg.ec.InitialElectionTickAdvance, "initial-election-tick-advance", cfg.ec.InitialElectionTickAdvance, "Whether to fast-forward initial election ticks on boot for faster election.")
|
fs.BoolVar(&cfg.ec.InitialElectionTickAdvance, "initial-election-tick-advance", cfg.ec.InitialElectionTickAdvance, "Whether to fast-forward initial election ticks on boot for faster election.")
|
||||||
fs.Int64Var(&cfg.ec.QuotaBackendBytes, "quota-backend-bytes", cfg.ec.QuotaBackendBytes, "Raise alarms when backend size exceeds the given quota. 0 means use the default quota.")
|
fs.Int64Var(&cfg.ec.QuotaBackendBytes, "quota-backend-bytes", cfg.ec.QuotaBackendBytes, "Raise alarms when backend size exceeds the given quota. 0 means use the default quota.")
|
||||||
|
fs.StringVar(&cfg.ec.BackendFreelistType, "backend-bbolt-freelist-type", cfg.ec.BackendFreelistType, "BackendFreelistType specifies the type of freelist that boltdb backend uses(array and map are supported types)")
|
||||||
fs.DurationVar(&cfg.ec.BackendBatchInterval, "backend-batch-interval", cfg.ec.BackendBatchInterval, "BackendBatchInterval is the maximum time before commit the backend transaction.")
|
fs.DurationVar(&cfg.ec.BackendBatchInterval, "backend-batch-interval", cfg.ec.BackendBatchInterval, "BackendBatchInterval is the maximum time before commit the backend transaction.")
|
||||||
fs.IntVar(&cfg.ec.BackendBatchLimit, "backend-batch-limit", cfg.ec.BackendBatchLimit, "BackendBatchLimit is the maximum operations before commit the backend transaction.")
|
fs.IntVar(&cfg.ec.BackendBatchLimit, "backend-batch-limit", cfg.ec.BackendBatchLimit, "BackendBatchLimit is the maximum operations before commit the backend transaction.")
|
||||||
fs.UintVar(&cfg.ec.MaxTxnOps, "max-txn-ops", cfg.ec.MaxTxnOps, "Maximum number of operations permitted in a transaction.")
|
fs.UintVar(&cfg.ec.MaxTxnOps, "max-txn-ops", cfg.ec.MaxTxnOps, "Maximum number of operations permitted in a transaction.")
|
||||||
|
@ -253,7 +254,6 @@ func newConfig() *config {
|
||||||
fs.BoolVar(&cfg.ec.ExperimentalInitialCorruptCheck, "experimental-initial-corrupt-check", cfg.ec.ExperimentalInitialCorruptCheck, "Enable to check data corruption before serving any client/peer traffic.")
|
fs.BoolVar(&cfg.ec.ExperimentalInitialCorruptCheck, "experimental-initial-corrupt-check", cfg.ec.ExperimentalInitialCorruptCheck, "Enable to check data corruption before serving any client/peer traffic.")
|
||||||
fs.DurationVar(&cfg.ec.ExperimentalCorruptCheckTime, "experimental-corrupt-check-time", cfg.ec.ExperimentalCorruptCheckTime, "Duration of time between cluster corruption check passes.")
|
fs.DurationVar(&cfg.ec.ExperimentalCorruptCheckTime, "experimental-corrupt-check-time", cfg.ec.ExperimentalCorruptCheckTime, "Duration of time between cluster corruption check passes.")
|
||||||
fs.StringVar(&cfg.ec.ExperimentalEnableV2V3, "experimental-enable-v2v3", cfg.ec.ExperimentalEnableV2V3, "v3 prefix for serving emulated v2 state.")
|
fs.StringVar(&cfg.ec.ExperimentalEnableV2V3, "experimental-enable-v2v3", cfg.ec.ExperimentalEnableV2V3, "v3 prefix for serving emulated v2 state.")
|
||||||
fs.StringVar(&cfg.ec.ExperimentalBackendFreelistType, "experimental-backend-bbolt-freelist-type", cfg.ec.ExperimentalBackendFreelistType, "ExperimentalBackendFreelistType specifies the type of freelist that boltdb backend uses(array and map are supported types)")
|
|
||||||
fs.BoolVar(&cfg.ec.ExperimentalEnableLeaseCheckpoint, "experimental-enable-lease-checkpoint", false, "Enable to persist lease remaining TTL to prevent indefinite auto-renewal of long lived leases.")
|
fs.BoolVar(&cfg.ec.ExperimentalEnableLeaseCheckpoint, "experimental-enable-lease-checkpoint", false, "Enable to persist lease remaining TTL to prevent indefinite auto-renewal of long lived leases.")
|
||||||
fs.IntVar(&cfg.ec.ExperimentalCompactionBatchLimit, "experimental-compaction-batch-limit", cfg.ec.ExperimentalCompactionBatchLimit, "Sets the maximum revisions deleted in each compaction batch.")
|
fs.IntVar(&cfg.ec.ExperimentalCompactionBatchLimit, "experimental-compaction-batch-limit", cfg.ec.ExperimentalCompactionBatchLimit, "Sets the maximum revisions deleted in each compaction batch.")
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,8 @@ Member:
|
||||||
Maximum number of wal files to retain (0 is unlimited).
|
Maximum number of wal files to retain (0 is unlimited).
|
||||||
--quota-backend-bytes '0'
|
--quota-backend-bytes '0'
|
||||||
Raise alarms when backend size exceeds the given quota (0 defaults to low space quota).
|
Raise alarms when backend size exceeds the given quota (0 defaults to low space quota).
|
||||||
|
--backend-bbolt-freelist-type 'map'
|
||||||
|
BackendFreelistType specifies the type of freelist that boltdb backend uses(array and map are supported types).
|
||||||
--backend-batch-interval ''
|
--backend-batch-interval ''
|
||||||
BackendBatchInterval is the maximum time before commit the backend transaction.
|
BackendBatchInterval is the maximum time before commit the backend transaction.
|
||||||
--backend-batch-limit '0'
|
--backend-batch-limit '0'
|
||||||
|
@ -200,8 +202,6 @@ Experimental feature:
|
||||||
Duration of time between cluster corruption check passes.
|
Duration of time between cluster corruption check passes.
|
||||||
--experimental-enable-v2v3 ''
|
--experimental-enable-v2v3 ''
|
||||||
Serve v2 requests through the v3 backend under a given prefix.
|
Serve v2 requests through the v3 backend under a given prefix.
|
||||||
--experimental-backend-bbolt-freelist-type 'array'
|
|
||||||
ExperimentalBackendFreelistType specifies the type of freelist that boltdb backend uses(array and map are supported types).
|
|
||||||
--experimental-enable-lease-checkpoint 'false'
|
--experimental-enable-lease-checkpoint 'false'
|
||||||
ExperimentalEnableLeaseCheckpoint enables primary lessor to persist lease remainingTTL to prevent indefinite auto-renewal of long lived leases.
|
ExperimentalEnableLeaseCheckpoint enables primary lessor to persist lease remainingTTL to prevent indefinite auto-renewal of long lived leases.
|
||||||
--experimental-compaction-batch-limit 1000
|
--experimental-compaction-batch-limit 1000
|
||||||
|
|
Loading…
Reference in New Issue