neo-go/pkg/core/storage
Roman Khimov 5fbe838fd4 core: add and use synchronous persist to avoid OOM
b9be892bf9 has made Persist asynchronous which
is very effective in allowing the system to continue processing
blocks/transactions while flushing things to disk. It at the same time is very
dangerous in that if the disk is slow and it takes much time to flush KV set
(more than persisting interval), there might be even bigger new KV set in
MemCachedStore by the time it finishes. Even if the system immediately starts
to flush this new data set it (being bigger) can take more time than the
previous one. And while doing so a new data set will appear in memory,
potentially again bigger than this.

So we can easily end up with the system going out of control, consuming more
and more memory and taking more and more time to persist a single set of
data. To avoid this we need to detect such condition and just wait for Persist
to really finish its job and release the resources.
2021-11-22 10:41:40 +03:00
..
boltdb_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
boltdb_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
leveldb_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
leveldb_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
memcached_store.go core: add and use synchronous persist to avoid OOM 2021-11-22 10:41:40 +03:00
memcached_store_test.go core: optimize (*MemCachedStore).Seek operation 2021-10-21 10:05:12 +03:00
memory_store.go core: sort items in MemoryStore.Seek 2021-10-21 10:05:12 +03:00
memory_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
store.go core: store NEP-11 transfers, add accessor functions 2021-11-18 00:09:10 +03:00
store_config.go storage: drop RedisDB, close #2130 2021-10-27 17:32:25 +03:00
store_test.go native: move contract deployment to management contract 2020-12-14 15:23:46 +03:00
storeandbatch_test.go storage: drop RedisDB, close #2130 2021-10-27 17:32:25 +03:00