Skip to content

Problem: Bigchaindb crashes when restarted after init chain#2519

Merged
muawiakh merged 1 commit intobigchaindb:masterfrom
kansi:iss/2518
Sep 6, 2018
Merged

Problem: Bigchaindb crashes when restarted after init chain#2519
muawiakh merged 1 commit intobigchaindb:masterfrom
kansi:iss/2518

Conversation

@kansi
Copy link
Copy Markdown
Contributor

@kansi kansi commented Sep 6, 2018

Solution: Return appropriate height so that Tendermint doesn't execute init_chain more than once

Fixes #2518

@kansi kansi requested review from ldmberman and muawiakh September 6, 2018 08:16
Solution: Return appropirate height so that Tendermint doesn't execute
init_chain more than once
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #2519 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #2519   +/-   ##
=======================================
  Coverage   91.87%   91.87%           
=======================================
  Files          42       42           
  Lines        2511     2511           
=======================================
  Hits         2307     2307           
  Misses        204      204

# NOTE: storing the block should be the last operation during commit
# this effects crash recovery. Refer BEP#8 for details
self.bigchaindb.store_block(block._asdict())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: There is not change here. pep8?

I don't understand the fix, maybe Work in progress?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah now I see, we are storing empty blocks, completely overlooked the indentation.

Copy link
Copy Markdown
Contributor

@muawiakh muawiakh left a comment

Choose a reason for hiding this comment

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

Overlooked the change, we are storing empty blocks. My bad.

IGNORE: No changes except a test and line spacing, or am i missing something.

Copy link
Copy Markdown
Contributor

@muawiakh muawiakh left a comment

Choose a reason for hiding this comment

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

Since we are storing empty blocks, are we also addressing when during upgrade/fork? Like we discussed yesterday. If election happens at height H the we will also store block H+1 because, Tendermint and the upgrade logic operations on H+1 block which should be then H+2

Copy link
Copy Markdown
Contributor

@muawiakh muawiakh left a comment

Choose a reason for hiding this comment

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

The upgrade issue can be taken care of in another PR. This fixes the issue. Just tested it. +1.

@muawiakh muawiakh merged commit 2656302 into bigchaindb:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants