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

state-history-exit-on-write-failure-2.0.x #10332

Conversation

huangminghuang
Copy link
Contributor

@huangminghuang huangminghuang commented May 3, 2021

Change Description

This PR address IS #9483 and IS #10113 so that the nodeos would exit when the state history plugin is unable to write trace/delta because of some invariant violations.

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

Add language to warn user that a nodoes node with state history plugin should not be configured as producer node because it may leave the fork db in an inconsistent state when it is unable to write traces/deltas to disk.

}
catch(const chain::plugin_exception& e) {
wlog( "chain::plugin_exception: ${details}", ("details", e.to_detail_string()) );
EOS_THROW(chain::controller_emit_signal_exception, "State history encountered an Error which it cannot recover from. Please resolve the error and relaunch the process")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to derive from chain::controller_emit_signal_exception not use it directly. See for example checkpoint_exception.

@huangminghuang huangminghuang requested a review from heifner May 4, 2021 15:19
@huangminghuang huangminghuang force-pushed the huangminghuang/state-history-exit-on-write-failure-2.0.x branch from 7b1dc36 to aa20b4c Compare May 4, 2021 20:25
elog( "chain::plugin_exception: ${details}", ("details", e.to_detail_string()) );
elog("State history encountered an Error which it cannot recover from. Please resolve the error and relaunch "
"the process");
appbase::app().quit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should throw like you had before but also call app().quit(). You don't want the block produced because on restart you need to reprocess the block so it can be written to SHiP.

@huangminghuang huangminghuang requested a review from heifner May 5, 2021 14:14
@huangminghuang huangminghuang force-pushed the huangminghuang/state-history-exit-on-write-failure-2.0.x branch from 9424ceb to b2a83f8 Compare May 5, 2021 19:55
@heifner heifner changed the title huangminghuang/state-history-exit-on-write-failure-2.0.x state-history-exit-on-write-failure-2.0.x May 6, 2021
@huangminghuang huangminghuang merged commit ffce82f into release/2.0.x May 6, 2021
@huangminghuang huangminghuang deleted the huangminghuang/state-history-exit-on-write-failure-2.0.x branch May 18, 2021 18:00
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.

2 participants