@@ -381,7 +381,7 @@ int ObDblinkCtxInSession::register_dblink_conn_pool(common::sqlclient::ObCommonS
returnret;
}
// When the session is about to be destroyed, the session will release all connections
// When the session is about to be reset, the session will release all connections
// from ObServerConnectionPool through this interface
intObDblinkCtxInSession::free_dblink_conn_pool()
{
...
...
@@ -400,9 +400,7 @@ int ObDblinkCtxInSession::free_dblink_conn_pool()
LOG_TRACE("free and close dblink connection in session",KP(this),K(session_info_->get_sessid()),K(i),K(dblink_conn_pool_array_.count()),K(dblink_conn_pool_array_),KP(dblink_conn_pool),K(lbt()));
}
}
if(OB_SUCC(ret)){
dblink_conn_pool_array_.reset();
}
returnret;
}
...
...
@@ -425,6 +423,11 @@ int ObDblinkCtxInSession::get_dblink_conn(uint64_t dblink_id, common::sqlclient:
break;
}
}
if(OB_SUCC(ret)&&OB_NOT_NULL(dblink_conn)&&
(OB_SUCCESS!=dblink_conn->ping())){
ret=OB_ERR_DBLINK_SESSION_KILLED;
LOG_WARN("connection is invalid",K(ret),K(dblink_conn->usable()),KP(dblink_conn));
}
returnret;
}
...
...
@@ -473,9 +476,12 @@ int ObDblinkCtxInSession::clean_dblink_conn(const bool force_disconnect)
}
}
}
if(OB_SUCC(ret)){
dblink_conn_holder_array_.reset();
}
arena_alloc_.reset();
reverse_dblink_=NULL;
reverse_dblink_buf_=NULL;
sys_var_reverse_info_buf_=NULL;
sys_var_reverse_info_buf_size_=0;
returnret;
}
...
...
@@ -491,19 +497,23 @@ int ObDblinkCtxInSession::get_reverse_link(ObReverseLink *&reverse_dblink)
LOG_WARN("failed to get SYS_VAR_SET_REVERSE_DBLINK_INFOS",K(value),K(ret));