etcdserver: clarify warnings on backend open taking >10 seconds

If db file is 10 GiB, it can take more than 1-second.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-01-26 10:08:59 -08:00
parent c5bba152ee
commit 50d2a00f01

View File

@ -58,8 +58,8 @@ func openBackend(cfg ServerConfig) backend.Backend {
select {
case be := <-beOpened:
return be
case <-time.After(time.Second):
plog.Warningf("another etcd process is using %q and holds the file lock.", fn)
case <-time.After(10 * time.Second):
plog.Warningf("another etcd process is using %q and holds the file lock, or loading backend file is taking >10 seconds", fn)
plog.Warningf("waiting for it to exit before starting...")
}
return <-beOpened