[OBCDC][LogFetcher] fix core caused by LSFetchCtx
This commit is contained in:
committed by
ob-robot
parent
86aee187c9
commit
82b5af6a6b
@ -77,6 +77,7 @@ int LSFetchCtxUpdateSourceFunctor::operator()(const ObLSID &id, logservice::ObRe
|
||||
|
||||
/////////////////////////////// LSFetchCtx /////////////////////////////////
|
||||
LSFetchCtx::LSFetchCtx() :
|
||||
source_(NULL),
|
||||
remote_iter_(LSFetchCtxGetSourceFunctor(*this),
|
||||
LSFetchCtxUpdateSourceFunctor(*this))
|
||||
{
|
||||
|
||||
@ -78,6 +78,7 @@ int LSFetchCtxUpdateSourceFunctor::operator()(const ObLSID &id, logservice::ObRe
|
||||
|
||||
/////////////////////////////// LSFetchCtx /////////////////////////////////
|
||||
LSFetchCtx::LSFetchCtx() :
|
||||
source_(NULL),
|
||||
remote_iter_(LSFetchCtxGetSourceFunctor(*this), LSFetchCtxUpdateSourceFunctor(*this))
|
||||
{
|
||||
reset();
|
||||
|
||||
@ -36,6 +36,7 @@ ObRemoteLogParent *ObResSrcAlloctor::alloc(const share::ObLogRestoreSourceType &
|
||||
source = OB_NEW(ObRemoteLocationParent, "LocSource", ls_id);
|
||||
break;
|
||||
default:
|
||||
CLOG_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "cannot allocate ObRemoteLogParent for invalid type", K(type), K(ls_id));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -45,7 +46,8 @@ ObRemoteLogParent *ObResSrcAlloctor::alloc(const share::ObLogRestoreSourceType &
|
||||
void ObResSrcAlloctor::free(ObRemoteLogParent *source)
|
||||
{
|
||||
if (NULL != source) {
|
||||
switch (source->get_source_type()) {
|
||||
const share::ObLogRestoreSourceType type = source->get_source_type();
|
||||
switch (type) {
|
||||
case share::ObLogRestoreSourceType::SERVICE:
|
||||
MTL_DELETE(ObRemoteLogParent, "SerSource", source);
|
||||
break;
|
||||
@ -56,6 +58,7 @@ void ObResSrcAlloctor::free(ObRemoteLogParent *source)
|
||||
MTL_DELETE(ObRemoteLogParent, "LocSource", source);
|
||||
break;
|
||||
default:
|
||||
CLOG_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "cannot free ObRemoteLogParent for a invalid type", K(type), KP(source));
|
||||
break;
|
||||
}
|
||||
source = NULL;
|
||||
|
||||
Reference in New Issue
Block a user