[CP] Fix px worker check status always return OB_SUCCESS

This commit is contained in:
qianchanger
2023-01-12 09:38:12 +00:00
committed by ob-robot
parent 8ffeb21dc9
commit fd39c584f3
18 changed files with 270 additions and 43 deletions

View File

@ -471,3 +471,27 @@ ObPxLocalWorkerFactory::~ObPxLocalWorkerFactory()
{
destroy();
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
int ObPxWorker::check_status()
{
int ret = OB_SUCCESS;
if (nullptr != session_) {
session_->is_terminate(ret);
}
if (OB_SUCC(ret)) {
if (is_timeout()) {
ret = OB_TIMEOUT;
} else if (IS_INTERRUPTED()) {
ObInterruptCode &ic = GET_INTERRUPT_CODE();
ret = ic.code_;
LOG_WARN("px execution was interrupted", K(ic), K(ret));
}
}
return ret;
}

View File

@ -226,6 +226,12 @@ public:
}
};
class ObPxWorker : public lib::Worker
{
public:
virtual int check_status() override;
};
}
}
#endif /* __OB_SQL_ENGINE_PX_WORKER_RUNNABLE_H__ */