!3653 当NDP队列为空时,不直接continue而是部分page走原生,防止死循环

Merge pull request !3653 from 阙鸣健/ndp_bugfix
This commit is contained in:
opengauss_bot
2023-06-30 06:42:40 +00:00
committed by Gitee

View File

@ -301,11 +301,7 @@ static bool NdpScanGetPage(NdpScanDesc ndpScan)
Assert(req >= resp);
if (ndpScan->handledBlock < ndpScan->nBlock) {
#ifdef ENABLE_SSL
if ((req - resp) >= NDP_MAX_AWAIT_REQUEST) {
#else
if ((req - resp) >= NDP_MAX_AWAIT_REQUEST || g_ndp_instance.pageContext->Empty()) {
#endif
pg_usleep(NDP_RPC_WAIT_USEC);
} else {
NdpScanTryPushDownScan((HeapScanDesc)ndpScan->scan, ndpScan);