From 901de26e853fc7d7752c8ecaccc3382ac288755f Mon Sep 17 00:00:00 2001 From: totaj Date: Tue, 12 Dec 2023 14:24:50 +0800 Subject: [PATCH] Fix global sys cache bug when exit. --- src/include/utils/knl_localsystabcache.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/utils/knl_localsystabcache.h b/src/include/utils/knl_localsystabcache.h index ba5eadd2c..8b3be1585 100644 --- a/src/include/utils/knl_localsystabcache.h +++ b/src/include/utils/knl_localsystabcache.h @@ -44,6 +44,9 @@ public: void ResetInitFlag(bool include_shared) { for (int cache_id = 0; cache_id < SysCacheSize; cache_id++) { + if (local_systupcaches[cache_id] == NULL) { + continue; + } if (!include_shared && local_systupcaches[cache_id]->GetCCRelIsShared()) { continue; } @@ -73,6 +76,9 @@ public: void ReleaseGlobalRefcount(bool include_shared) { for (int cache_id = 0; cache_id < SysCacheSize; cache_id++) { + if (local_systupcaches[cache_id] == NULL) { + continue; + } if (!include_shared && local_systupcaches[cache_id]->GetCCRelIsShared()) { continue; }