You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the session is obtained from the manager for the first time, it will determine whether the pool is empty for initialization. However, when initializing, the pool will be constructed first. If the pool initialization is abnormal, an exception will be thrown, and the first session acquisition fails. When retrying for the second time, the pool is no longer empty and will not be initialized again, and the subsequent logic will be performed directly, which may result in a NPE.
Related code:
private void init() throws RuntimeException {
try {
pool = new NebulaPool();
if (!pool.init(config.getAddresses(), config.getPoolConfig())) {
throw new RuntimeException("Init pool failed: services are broken.");
}
…}
public synchronized SessionWrapper getSessionWrapper() throws RuntimeException,
ClientServerIncompatibleException {
checkClose();
if (pool == null) {
init();
}
…}
The text was updated successfully, but these errors were encountered:
When the session is obtained from the manager for the first time, it will determine whether the pool is empty for initialization. However, when initializing, the pool will be constructed first. If the pool initialization is abnormal, an exception will be thrown, and the first session acquisition fails. When retrying for the second time, the pool is no longer empty and will not be initialized again, and the subsequent logic will be performed directly, which may result in a NPE.
Related code:
private void init() throws RuntimeException {
try {
pool = new NebulaPool();
if (!pool.init(config.getAddresses(), config.getPoolConfig())) {
throw new RuntimeException("Init pool failed: services are broken.");
}
…}
public synchronized SessionWrapper getSessionWrapper() throws RuntimeException,
ClientServerIncompatibleException {
checkClose();
if (pool == null) {
init();
}
…}
The text was updated successfully, but these errors were encountered: