You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xiangdong Huang (Jira)" <ji...@apache.org> on 2021/09/24 07:33:00 UTC
[jira] [Created] (IOTDB-1732) check the logic of stop() and
shutdown() in IoTDB.java
Xiangdong Huang created IOTDB-1732:
--------------------------------------
Summary: check the logic of stop() and shutdown() in IoTDB.java
Key: IOTDB-1732
URL: https://issues.apache.org/jira/browse/IOTDB-1732
Project: Apache IoTDB
Issue Type: Task
Components: Core/Server
Reporter: Xiangdong Huang
Currently, IoTDB's stop() function and shutdown() function has different logic:
{code:java}
@Override
public void stop() {
deactivate();
}
private void deactivate() {
logger.info("Deactivating IoTDB...");
// some user may call Tracing on but do not close tracing.
// so, when remove the system, we have to close the tracing
if (IoTDBDescriptor.getInstance().getConfig().isEnablePerformanceTracing()) {
TracingManager.getInstance().close();
}
PrimitiveArrayManager.close();
SystemInfo.getInstance().close();
registerManager.deregisterAll();
JMXService.deregisterMBean(mbeanName);
logger.info("IoTDB is deactivated.");
}
public void shutdown() throws Exception {
//TODO shutdown is not equal to stop()
logger.info("Deactivating IoTDB...");
if (IoTDBDescriptor.getInstance().getConfig().isEnablePerformanceTracing()) {
TracingManager.getInstance().close();
}
registerManager.shutdownAll();
PrimitiveArrayManager.close();
SystemInfo.getInstance().close();
JMXService.deregisterMBean(mbeanName);
logger.info("IoTDB is deactivated.");
}
{code}
We need to define the behavior clear: when to use stop and when to use shutdown? what is the difference?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)