Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Keep all block logs in retained directory #10350

Merged
merged 7 commits into from
May 25, 2021
Merged

Conversation

shahabi8
Copy link
Contributor

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:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@@ -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),
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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) ?

Copy link
Contributor

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

Copy link
Contributor Author

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.

@shahabi8 shahabi8 merged commit e657732 into develop May 25, 2021
@shahabi8 shahabi8 deleted the keep_all_block_log_stride branch May 25, 2021 19:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants