-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Keep all block logs in retained directory #10350
Conversation
@@ -281,7 +281,7 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip | |||
"When the stride is reached, the current block log and index will be renamed '<blocks-retained-dir>/blocks-<start num>-<end num>.log/index'\n" | |||
"and a new current block log and index will be created with the most recent block. All files following\n" | |||
"this format will be used to construct an extended block log.") | |||
("max-retained-block-files", bpo::value<uint16_t>()->default_value(config::default_max_retained_block_files), | |||
("max-retained-block-files", bpo::value<uint32_t>()->default_value(config::default_max_retained_block_files), |
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.
should this be an optional configuration item (i.e. no default), instead of a configuration item that defaults to a user visible high number?
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.
Thanks for the feedback, I just asked for other team members inputs here on how to address this issue.
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.
@spoonincode do you mean to also add an ->implicit_value(config::default_max_retained_block_files)
?
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.
No I mean remove ->default_value(config::default_max_retained_block_files)
. As is, this shows up in the config file as
# the maximum number of blocks files to retain so that the blocks in those files can be queried.
# When the number is reached, the oldest block file would be moved to archive dir or deleted if the archive dir is empty.
# The retained block log files should not be manipulated by users. (eosio::chain_plugin)
# max-retained-block-files = 4294967295
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.
@spoonincode, I addressed your comment above, please let me know if you have any other suggestions.
Change Description
This PR resolves an issue on keeping all block logs in retained folder rather than moving them to archive. The default setting is changed from keeping 10 block logs in retained directory to keep all the logs there.
Change Type
Select ONE:
Testing Changes
Select ANY that apply:
Consensus Changes
API Changes
Documentation Additions