Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Reduce log level when block miner is interrupted #1006

Merged
merged 4 commits into from
Feb 28, 2019

Conversation

ajsutton
Copy link
Contributor

PR description

Often during shutdown the miner prints:

2019-02-28 07:05:53.717+10:00 | pool-9-thread-1 | ERROR | BlockMiner | Block mining was interrupted.
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method) ~[?:1.8.0_172]
	at tech.pegasys.pantheon.ethereum.blockcreation.AbstractBlockScheduler.waitUntilNextBlockCanBeMined(AbstractBlockScheduler.java:31) ~[classes/:?]
	at tech.pegasys.pantheon.ethereum.blockcreation.BlockMiner.mineBlock(BlockMiner.java:90) ~[classes/:?]
	at tech.pegasys.pantheon.ethereum.blockcreation.BlockMiner.run(BlockMiner.java:72) [classes/:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_172]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_172]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]

This PR fixes the interrupt handling so the log is at debug level, the thread continues to be marked as interrupted and BlockMiner doesn't start creating a new block if it's already been cancelled.

…ining a new block if mining has been cancelled.
@ajsutton ajsutton requested a review from rain-on February 27, 2019 21:10
@ajsutton ajsutton merged commit b5cb8a3 into PegaSysEng:master Feb 28, 2019
@ajsutton ajsutton deleted the miner-log branch February 28, 2019 04:59
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