From 83a2e4776ce7226ea6ce6ffe7a5eb5d1f2ac1bc6 Mon Sep 17 00:00:00 2001 From: chenxiaobin Date: Wed, 16 Sep 2020 20:10:42 +0800 Subject: [PATCH] fix dbe_perf.wait_events cannot update failed_with when lock timeout --- src/gausskernel/storage/lmgr/lock.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gausskernel/storage/lmgr/lock.cpp b/src/gausskernel/storage/lmgr/lock.cpp index 614681944..844fe9fa5 100755 --- a/src/gausskernel/storage/lmgr/lock.cpp +++ b/src/gausskernel/storage/lmgr/lock.cpp @@ -1644,6 +1644,10 @@ static void WaitOnLock(LOCALLOCK *locallock, ResourceOwner owner, bool allow_con * * Report change to non-waiting status */ + if (t_thrd.storage_cxt.deadlock_state == DS_LOCK_TIMEOUT) { + pgstat_report_wait_lock_failed(PG_WAIT_LOCK | locallock->tag.lock.locktag_type); + } + pgstat_report_waitevent(WAIT_EVENT_END); if (u_sess->attr.attr_common.update_process_title) { set_ps_display(new_status, false);