[OBCDC][LogFetcher] fix core caused by LSFetchCtx

This commit is contained in:
zxlzxlzxlzxlzxl
2023-07-19 04:42:19 +00:00
committed by ob-robot
parent 86aee187c9
commit 82b5af6a6b
3 changed files with 6 additions and 1 deletions

View File

@ -77,6 +77,7 @@ int LSFetchCtxUpdateSourceFunctor::operator()(const ObLSID &id, logservice::ObRe
/////////////////////////////// LSFetchCtx /////////////////////////////////
LSFetchCtx::LSFetchCtx() :
source_(NULL),
remote_iter_(LSFetchCtxGetSourceFunctor(*this),
LSFetchCtxUpdateSourceFunctor(*this))
{

View File

@ -78,6 +78,7 @@ int LSFetchCtxUpdateSourceFunctor::operator()(const ObLSID &id, logservice::ObRe
/////////////////////////////// LSFetchCtx /////////////////////////////////
LSFetchCtx::LSFetchCtx() :
source_(NULL),
remote_iter_(LSFetchCtxGetSourceFunctor(*this), LSFetchCtxUpdateSourceFunctor(*this))
{
reset();

View File

@ -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;