-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(db):tune the databases closure #5429
feat(db):tune the databases closure #5429
Conversation
} | ||
dbManager.stopRePushThread(); | ||
dbManager.stopRePushTriggerThread(); | ||
EventPluginLoader.getInstance().stopPlugin(); | ||
dbManager.stopFilterProcessThread(); | ||
dbManager.stopValidateSignThread(); | ||
getChainBaseManager().shutdown(); | ||
dynamicArgs.close(); | ||
logger.info("******** end to shutdown ********"); | ||
FullNode.shutDownSign = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this shutDownSign assign move to dbmanager.stopValidateSignThread?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be solved here #5433 .
@@ -284,10 +284,6 @@ public synchronized void disable() { | |||
|
|||
@Override | |||
public void shutdown() { | |||
logger.info("******** Begin to pop revokingDb. ********"); | |||
logger.info("******** Before revokingDb size: {}.", size); | |||
checkTmpStore.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should remove the logs and the operation closing checkTmpStore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #5429 +/- ##
=============================================
+ Coverage 60.94% 60.98% +0.03%
- Complexity 9243 9255 +12
=============================================
Files 840 840
Lines 50057 50012 -45
Branches 5577 5576 -1
=============================================
- Hits 30508 30499 -9
+ Misses 17152 17112 -40
- Partials 2397 2401 +4
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b901f71
to
c4d630e
Compare
close #5428 .