Merge pull request #5101 from filecoin-project/raulk/memory-watchdog
introduce memory watchdog; LOTUS_MAX_HEAP
This commit is contained in:
+7
-1
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/chain/vm"
|
||||
"github.com/filecoin-project/lotus/chain/wallet"
|
||||
"github.com/filecoin-project/lotus/node/hello"
|
||||
"github.com/filecoin-project/lotus/system"
|
||||
|
||||
logging "github.com/ipfs/go-log"
|
||||
ci "github.com/libp2p/go-libp2p-core/crypto"
|
||||
@@ -111,8 +112,10 @@ const (
|
||||
// the system starts, so that it's available for all other components.
|
||||
InitJournalKey = invoke(iota)
|
||||
|
||||
// libp2p
|
||||
// System processes.
|
||||
InitMemoryWatchdog
|
||||
|
||||
// libp2p
|
||||
PstoreAddSelfKeysKey
|
||||
StartListeningKey
|
||||
BootstrapKey
|
||||
@@ -174,6 +177,9 @@ func defaults() []Option {
|
||||
Override(new(journal.DisabledEvents), journal.EnvDisabledEvents),
|
||||
Override(new(journal.Journal), modules.OpenFilesystemJournal),
|
||||
|
||||
Override(new(system.MemoryConstraints), modules.MemoryConstraints),
|
||||
Override(InitMemoryWatchdog, modules.MemoryWatchdog),
|
||||
|
||||
Override(new(helpers.MetricsCtx), func() context.Context {
|
||||
return metricsi.CtxScope(context.Background(), "lotus")
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user