feat(db):tune the databases closure#5429
Conversation
| getChainBaseManager().shutdown(); | ||
| dynamicArgs.close(); | ||
| logger.info("******** end to shutdown ********"); | ||
| FullNode.shutDownSign = true; |
There was a problem hiding this comment.
Should this shutDownSign assign move to dbmanager.stopValidateSignThread?
| public void shutdown() { | ||
| logger.info("******** Begin to pop revokingDb. ********"); | ||
| logger.info("******** Before revokingDb size: {}.", size); | ||
| checkTmpStore.close(); |
There was a problem hiding this comment.
Why should remove the logs and the operation closing checkTmpStore?
There was a problem hiding this comment.
According to DisposableBeanAdapter.inferDestroyMethodIfNecessary:
If the current value of the given beanDefinition's "destroyMethodName" property is AbstractBeanDefinition.INFER_METHOD, then attempt to infer a destroy method. Candidate methods are currently limited to public, no-arg methods named "close" or "shutdown" (whether declared locally or inherited). The given BeanDefinition's "destroyMethodName" is updated to be null if no such method is found, otherwise set to the name of the inferred method. This constant serves as the default for the @bean#destroyMethod attribute and the value of the constant may also be used in XML within the or attributes.
Also processes the java.io.Closeable and AutoCloseable interfaces, reflectively calling the "close" method on implementing beans as well.
checkTmpStore implements AutoCloseable, will be auto-closed.
2a43a17 to
b901f71
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5429 +/- ##
=============================================
- Coverage 61.09% 61.02% -0.07%
+ Complexity 9280 9279 -1
=============================================
Files 840 840
Lines 50175 50136 -39
Branches 5584 5583 -1
=============================================
- Hits 30652 30595 -57
- Misses 17125 17138 +13
- Partials 2398 2403 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b901f71 to
c4d630e
Compare
close #5428 .