Skip to content

fixed kernel shutdown hanging#1131

Merged
AionJayT merged 3 commits intomasterfrom
shutdown-fix
Mar 18, 2020
Merged

fixed kernel shutdown hanging#1131
AionJayT merged 3 commits intomasterfrom
shutdown-fix

Conversation

@AionJayT
Copy link
Copy Markdown
Collaborator

Description

Fixes Issue # .

Type of change

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

@AionJayT AionJayT added the bug Something isn't working label Mar 13, 2020
@AionJayT AionJayT added this to the 1.5 milestone Mar 13, 2020
@AionJayT AionJayT force-pushed the shutdown-fix branch 2 times, most recently from da7c1ae to 08e4c58 Compare March 17, 2020 18:38
Copy link
Copy Markdown
Contributor

@AlexandraRoatis AlexandraRoatis left a comment

Choose a reason for hiding this comment

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

Is the second commit still necessary? Wouldn't the re-entrant lock prevent any deadlocks? Also, in the past there have been very big objections to expanding the ImportResult enum.


private SelfNodeStatusCallback callback;
private BestBlockImportCallback bestBlockCallback;
ReentrantLock blockChainCoreLock = new ReentrantLock();
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.

minor: I would call it simply lock

LOG.debug("BestStakingBlock {}", bestStakingBlock.toString());
if (LOG.isDebugEnabled()) {
LOG.debug("BestBlock {}", bestBlock.toString());
if (bestMiningBlock != null) {
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.

Can we omit the null checks and the .toString in each of the messages?

@AionJayT AionJayT merged commit 2da813c into master Mar 18, 2020
@AionJayT AionJayT deleted the shutdown-fix branch March 23, 2020 17:29
@AionJayT AionJayT self-assigned this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants