-
Notifications
You must be signed in to change notification settings - Fork 3.8k
add guard track to database #4666
add guard track to database #4666
Conversation
In addition to setting the size you can now set a minimum guard on the chain state db. If there is a db-growing operation called on controller while this guard is violated it will throw and the node should dhutdown gracefully. related to EOSIO#4555
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment to address (second one was invalid)
@@ -19,6 +19,7 @@ const static auto default_reversible_cache_size = 340*1024*1024ll;/// 1MB * 340 | |||
const static auto default_state_dir_name = "state"; | |||
const static auto forkdb_filename = "forkdb.dat"; | |||
const static auto default_state_size = 1*1024*1024*1024ll; | |||
const static auto default_state_guard_size = 512*1024ll; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is divided by 1024*1024 in chain_plugin, I'm guessing you are missing a *1024 here
@@ -341,6 +342,9 @@ void chain_plugin::plugin_initialize(const variables_map& options) { | |||
if( options.count( "chain-state-db-size-mb" )) | |||
my->chain_config->state_size = options.at( "chain-state-db-size-mb" ).as<uint64_t>() * 1024 * 1024; | |||
|
|||
if( options.count( "chain-state-db-guard-size-mb" )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget this comment, missed it was a minimum size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although this is fair, it looks like I was intending the track to be 512k... hrm
…n database cleanly exits when exhaustion occurs in replay
|
In addition to setting the size you can now set a minimum guard on the chain state db. If there is a db-growing operation called on controller while this guard is violated it will throw and the node should shutdown gracefully.
the config is:
chain-state-db-guard-size-mb
defaulted to 1MiBrelated to #4555