Compare commits

...

1 Commits

Author SHA1 Message Date
林科旭 0c4cf14576 修复 undo recycler线程cpu占用100% 2022-03-31 18:00:26 +08:00
1 changed files with 3 additions and 1 deletions

View File

@ -448,7 +448,9 @@ static void RecycleWaitIfNotUsed()
#endif
) {
uint64 nonRecycled = 0;
while (true) {
while (g_instance.attr.attr_storage.undo_zone_count == 0) {
/* Clear any already-pending wakeups */
ResetLatch(&t_thrd.proc->procLatch);
if (t_thrd.undorecycler_cxt.shutdown_requested) {
ereport(LOG, (errmodule(MOD_UNDO), errmsg(UNDOFORMAT("UndoRecycler: shutting down"))));
ResourceOwnerRelease(t_thrd.utils_cxt.CurrentResourceOwner, RESOURCE_RELEASE_BEFORE_LOCKS, false, true);