mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
server: replace mlockall with Mlock in --experimental-memory-mlock
Implementation of `--experimental-memory-mlock` backed by `mlockall` syscall is replaced by `Mlock` flag (backed by mlock syscall) of bboltDB.
This commit is contained in:
@@ -50,9 +50,6 @@ func newBackend(cfg config.ServerConfig) backend.Backend {
|
|||||||
// permit 10% excess over quota for disarm
|
// permit 10% excess over quota for disarm
|
||||||
bcfg.MmapSize = uint64(cfg.QuotaBackendBytes + cfg.QuotaBackendBytes/10)
|
bcfg.MmapSize = uint64(cfg.QuotaBackendBytes + cfg.QuotaBackendBytes/10)
|
||||||
}
|
}
|
||||||
if cfg.ExperimentalMemoryMlock {
|
|
||||||
cfg.Logger.Info("setting `Mlock` bbolt flag")
|
|
||||||
}
|
|
||||||
bcfg.Mlock = cfg.ExperimentalMemoryMlock
|
bcfg.Mlock = cfg.ExperimentalMemoryMlock
|
||||||
|
|
||||||
return backend.New(bcfg)
|
return backend.New(bcfg)
|
||||||
|
|||||||
Reference in New Issue
Block a user